Skip to content

Commit

Permalink
Hotfix: Config object doesn't have ".get"
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterGroosha committed May 18, 2021
1 parent 81b2681 commit 5c69986
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bot/handlers/main_group_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


async def error_no_reply(message: types.Message):
lang = message.bot.get("config").get("lang")
lang = message.bot.get("config").lang
await message.reply(get_string(lang, "error_no_reply"))


Expand All @@ -31,7 +31,7 @@ async def cmd_ro(message: types.Message):
:param message: Telegram message starting with /ro
"""
lang = message.bot.get("config").get("lang")
lang = message.bot.get("config").lang
readonly_to = await message.chat.get_member(message.reply_to_message.from_user.id)
if readonly_to.is_chat_admin():
await message.reply(get_string(lang, "error_restrict_admin"))
Expand Down Expand Up @@ -60,7 +60,7 @@ async def cmd_nomedia(message: types.Message):
:param message: Telegram message starting with /nomedia
"""
lang = message.bot.get("config").get("lang")
lang = message.bot.get("config").lang
nomedia_to = await message.chat.get_member(message.reply_to_message.from_user.id)
if nomedia_to.is_chat_admin():
await message.reply(get_string(lang, "error_restrict_admin"))
Expand Down
2 changes: 1 addition & 1 deletion bot/handlers/main_group_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def get_message_url(chat_id, message_id):


async def error_no_reply(message: types.Message):
lang = message.bot.get("config").get("lang")
lang = message.bot.get("config").lang
await message.reply(get_string(lang, "error_no_reply"))


Expand Down

0 comments on commit 5c69986

Please sign in to comment.