Skip to content

Commit 2af64b4

Browse files
committed
renamed stats into report (was too similar to /start)
Signed-off-by: call-me-matt <[email protected]>
1 parent 17e2ae6 commit 2af64b4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
this is a bot for telegram that monitors changes for a list of openstreetmap users.
44

5-
you can customize your list and requests stats by sending `/stats`. Additionally, if a user exceeds 300 or 1000 changes in the current month, a notification message is sent.
5+
you can customize your list and request stats by sending `/report`. Additionally, if a user exceeds 300 or 1000 changes in the current month, a notification message is sent.
66

77
## installation
88

src/telegramHandler.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
class telegramHandler (threading.Thread):
3030

3131
def register(self, update, context):
32-
context.bot.send_message(chat_id=update.message.chat_id, text="Hello, " + update.message.from_user.first_name + ". I can request the number of changes for OSM users. Just send me a message saying /stats. Add OSM users by writing a /follow message, or remove them by writing /unfollow")
32+
context.bot.send_message(chat_id=update.message.chat_id, text="Hello, " + update.message.from_user.first_name + ". I can request the number of changes for OSM users. Just send me a message saying /report. Add OSM users by writing a /follow message, or remove them with /unfollow")
3333
databaseHandler.addUser(update.message.from_user.name,update.message.chat_id)
3434

3535
def stop(self, update, context):
@@ -85,7 +85,7 @@ def cancel(self, update, context):
8585
)
8686
return ConversationHandler.END
8787

88-
def stats(self, update, context):
88+
def report(self, update, context):
8989
stats = databaseHandler.getStats(update.message.from_user.name)
9090
if stats == "":
9191
stats = "You need to follow OSM users by writing a /follow message first."
@@ -177,8 +177,8 @@ def run(self):
177177
unfollow_handler = CommandHandler('unfollow', self.unfollow, pass_args=True)
178178
self.dispatcher.add_handler(unfollow_handler)
179179

180-
stats_handler = CommandHandler('stats', self.stats, pass_args=True)
181-
self.dispatcher.add_handler(stats_handler)
180+
report_handler = CommandHandler('report', self.report, pass_args=True)
181+
self.dispatcher.add_handler(report_handler)
182182

183183
echo_handler = MessageHandler(Filters.text, self.echo)
184184
self.dispatcher.add_handler(echo_handler)

0 commit comments

Comments
 (0)