Skip to content

Commit 4e359b5

Browse files
committed
FIX: Bring back hide function
fixes #18
1 parent 6ef495f commit 4e359b5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

main.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from telegram.ext import Updater, CommandHandler, CallbackQueryHandler, MessageHandler, Filters
77
from telegram.inline.inlinekeyboardbutton import InlineKeyboardButton
88
from telegram.inline.inlinekeyboardmarkup import InlineKeyboardMarkup
9+
from telegram import ReplyKeyboardRemove
910

1011
from database.db_wrapper import DBwrapper
1112
from database.statistics import get_user_stats
@@ -232,6 +233,12 @@ def mentions(bot, update):
232233
pass
233234

234235

236+
def hide_cmd(bot, update):
237+
chat_id = update.message.chat_id
238+
reply_markup = ReplyKeyboardRemove()
239+
bot.sendMessage(chat_id=chat_id, text="\U0001F44D", reply_markup=reply_markup)
240+
241+
235242
def change_language(bot, update, lang_id):
236243
bot.editMessageText(chat_id=update.callback_query.message.chat_id, text=translate("langChanged", lang_id),
237244
message_id=update.callback_query.message.message_id, reply_markup=None)
@@ -322,6 +329,7 @@ def get_translations_of_string(string):
322329

323330
start_handler = CommandHandler(get_translations_of_string("startCmd"), start_cmd)
324331
stop_handler = CommandHandler(get_translations_of_string("stopCmd"), stop_cmd)
332+
hide_handler = CommandHandler('hide', hide_cmd)
325333
stats_handler = CommandHandler('stats', stats_cmd)
326334
language_handler = CommandHandler('language', language_cmd)
327335
callback_handler = CallbackQueryHandler(callback_eval)
@@ -344,6 +352,7 @@ def get_translations_of_string(string):
344352
dispatcher.add_handler(join_sec)
345353
dispatcher.add_handler(comment_handler)
346354
dispatcher.add_handler(cancel_handler)
355+
dispatcher.add_handler(hide_handler)
347356
dispatcher.add_handler(game_command_handler)
348357

349358
updater.start_polling()

0 commit comments

Comments
 (0)