don't edit message to remove inline keyboard anymore
Signed-off-by: Konrad <klux2@hs-mittweida.de>
This commit is contained in:
parent
c7c2f271ec
commit
9e0622e985
1 changed files with 3 additions and 13 deletions
|
@ -74,8 +74,6 @@ class HSMensaW(telepot.aio.helper.ChatHandler):
|
|||
[InlineKeyboardButton(text="Deutsch + English", callback_data=Language.GERMAN_ENGLISH.value)],
|
||||
])
|
||||
|
||||
editors = dict()
|
||||
|
||||
async def on_chat_message(self, msg: dict) -> None:
|
||||
global config, essen, status, var, logging_enabled
|
||||
|
||||
|
@ -131,15 +129,11 @@ class HSMensaW(telepot.aio.helper.ChatHandler):
|
|||
await send_message(bot_obj=bot, chat_id=chat_id, msg=info_str, parse_mode="markdown")
|
||||
|
||||
elif text.startswith("/settings"):
|
||||
old_editor = self.editors.pop(chat_id, None)
|
||||
if old_editor is not None:
|
||||
await old_editor.deleteMessage()
|
||||
|
||||
sent = await self.sender.sendMessage("Bitte Sprache(n) auswählen/Please select language(s)",
|
||||
await send_message(bot_obj=bot, chat_id=chat_id,
|
||||
msg="Bitte Sprache(n) auswählen/Please select language(s)",
|
||||
reply_markup=self.keyboard)
|
||||
|
||||
self.editors[chat_id] = telepot.aio.helper.Editor(bot, sent)
|
||||
|
||||
elif text.startswith("/status") and chat_id in config_ids:
|
||||
await send_message(bot_obj=bot, chat_id=chat_id, msg=status, parse_mode="markdown")
|
||||
|
||||
|
@ -172,10 +166,6 @@ class HSMensaW(telepot.aio.helper.ChatHandler):
|
|||
global config, ids
|
||||
query_id, from_id, query_data = telepot.glance(msg, flavor='callback_query')
|
||||
|
||||
editor = self.editors.pop(from_id, None)
|
||||
if editor is not None:
|
||||
await editor.editMessageReplyMarkup(reply_markup=None)
|
||||
|
||||
message = "Fehler beim Setzen der Sprache"
|
||||
if query_data == Language.GERMAN.value:
|
||||
message = "Sprache geändert nach _deutsch_."
|
||||
|
|
Loading…
Reference in a new issue