mirror of https://github.com/coddrago/Heroku
Remember inline_message_id of form in case it gets unloaded before the result is returned
parent
69c64072c3
commit
fa1ff8527a
|
@ -212,6 +212,8 @@ class Form(InlineUnit):
|
||||||
if status_message and not message.out:
|
if status_message and not message.out:
|
||||||
await status_message.delete()
|
await status_message.delete()
|
||||||
|
|
||||||
|
inline_message_id = self._forms[form_uid]["inline_message_id"]
|
||||||
|
|
||||||
if not any(
|
if not any(
|
||||||
any("callback" in button or "input" in button for button in row)
|
any("callback" in button or "input" in button for button in row)
|
||||||
for row in reply_markup
|
for row in reply_markup
|
||||||
|
@ -222,7 +224,7 @@ class Form(InlineUnit):
|
||||||
"doesn't contain any button callbacks"
|
"doesn't contain any button callbacks"
|
||||||
)
|
)
|
||||||
|
|
||||||
return InlineMessage(self, form_uid, self._forms[form_uid]["inline_message_id"])
|
return InlineMessage(self, form_uid, inline_message_id)
|
||||||
|
|
||||||
async def _form_inline_handler(self, inline_query: InlineQuery) -> None:
|
async def _form_inline_handler(self, inline_query: InlineQuery) -> None:
|
||||||
for form in self._forms.copy().values():
|
for form in self._forms.copy().values():
|
||||||
|
|
Loading…
Reference in New Issue