Skip to content

Commit 378edba

Browse files
author
Rico
committed
TASK: Remove unnecessary bot object
1 parent 7e7d0e4 commit 378edba

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
dispatcher = updater.dispatcher
4343

4444
game_handler = GameHandler().get_instance()
45-
tg_bot = updater.bot
4645

4746

4847
# -----------------
@@ -79,8 +78,8 @@ def callback_eval(bot, update):
7978

8079

8180
def send_message(chat_id, text, message_id=None, parse_mode=None, reply_markup=None, game_id=None):
82-
tg_bot.sendMessage(chat_id=chat_id, text=text, reply_to_message_id=message_id, parse_mode=parse_mode,
83-
reply_markup=reply_markup)
81+
updater.bot.sendMessage(chat_id=chat_id, text=text, reply_to_message_id=message_id, parse_mode=parse_mode,
82+
reply_markup=reply_markup)
8483

8584

8685
def send_mp_message(chat_id, text, message_id=None, parse_mode=None, reply_markup=None, game_id=None):

0 commit comments

Comments
 (0)