Skip to content

Commit

Permalink
Fix Bot owner ID detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Rios committed Aug 27, 2020
1 parent 2d07513 commit deb47ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sources/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Last modified date:
27/08/2020
Version:
1.12.7
1.12.8
'''

################################################################################
Expand Down Expand Up @@ -172,7 +172,7 @@
"DEV_BTC": "3N9wf3FunR6YNXonquBeWammaBZVzTXTyR",

# Bot version
"VERSION": "1.12.7 (27/08/2020)"
"VERSION": "1.12.8 (27/08/2020)"
}


Expand Down
8 changes: 4 additions & 4 deletions sources/join_captcha_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Last modified date:
27/08/2020
Version:
1.12.7
1.12.8
'''

################################################################################
Expand Down Expand Up @@ -1748,7 +1748,7 @@ def cmd_captcha(update: Update, context: CallbackContext):
if user.username is not None:
user_alias = "@{}".format(user.username)
# Check if command was execute by Bot owner
if (user_id != CONST["BOT_OWNER"]) and (user_alias != CONST["BOT_OWNER"]):
if (str(user_id) != CONST["BOT_OWNER"]) and (user_alias != CONST["BOT_OWNER"]):
tlg_send_selfdestruct_msg(bot, chat_id, CONST["CMD_JUST_ALLOW_OWNER"])
return
# Set user command message to be deleted by Bot in default time
Expand Down Expand Up @@ -1791,7 +1791,7 @@ def cmd_whitelist(update: Update, context: CallbackContext):
if user.username is not None:
user_alias = "@{}".format(user.username)
# Check if command was execute by Bot owner
if (user_id != CONST["BOT_OWNER"]) and (user_alias != CONST["BOT_OWNER"]):
if (str(user_id) != CONST["BOT_OWNER"]) and (user_alias != CONST["BOT_OWNER"]):
tlg_send_selfdestruct_msg(bot, chat_id, CONST["CMD_JUST_ALLOW_OWNER"])
return
# Set user command message to be deleted by Bot in default time
Expand Down Expand Up @@ -1852,7 +1852,7 @@ def cmd_allowgroup(update: Update, context: CallbackContext):
if user.username is not None:
user_alias = "@{}".format(user.username)
# Check if command was execute by Bot owner
if (user_id != CONST["BOT_OWNER"]) and (user_alias != CONST["BOT_OWNER"]):
if (str(user_id) != CONST["BOT_OWNER"]) and (user_alias != CONST["BOT_OWNER"]):
tlg_send_selfdestruct_msg(bot, chat_id, CONST["CMD_JUST_ALLOW_OWNER"])
return
# Set user command message to be deleted by Bot in default time
Expand Down

0 comments on commit deb47ba

Please sign in to comment.