Skip to content

Commit

Permalink
Translating to english and adding register system
Browse files Browse the repository at this point in the history
  • Loading branch information
adderou committed Jun 13, 2017
1 parent f4f0128 commit 7b472d0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
20 changes: 11 additions & 9 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def handle(msg):
else:
bot.sendMessage(chat_id, "You can't delete a chat's tag from a different chat.")
else:
bot.sendMessage(chat_id, "Tag doesn't exist on taglist")
bot.sendMessage(chat_id, "Tag doesn't exist on TagList")
else:
bot.sendMessage(chat_id, "Incorrect format. It should be _/rm #{tag}_", parse_mode="Markdown")

Expand All @@ -102,8 +102,12 @@ def handle(msg):
save_allowed(allowed)
bot.sendMessage(chat_id, msg['from']['first_name']+", you have been registered as an authorized user of this bot.")
else:
bot.sendMessage(chat_id, "Password incorrecto.")
bot.sendMessage(chat_id, "Wrong password.")
print(msg['from']['first_name'] + " " + (msg['from']['last_name'] if 'last_name' in msg['from'] else "") + ": " +str(msg['from']['id']))
elif "/rmme" == txt.strip()[:5]:
allowed.remove(msg['from']['id'])
bot.sendMessage(chat_id, "Your permission for using the bot was removed successfully.")

elif "#" == txt[0]:
txt_split =txt.strip().split(" ")
i = 0
Expand Down

0 comments on commit 7b472d0

Please sign in to comment.