This commit closes #13

This commit is contained in:
2023-08-14 12:11:53 +02:00
parent 7a587ececa
commit fdd5ad7ff0
8 changed files with 91 additions and 18 deletions

View File

@@ -82,10 +82,11 @@ async def callback_emoji_button(app: PyroClient, callback: CallbackQuery):
app._("captcha_failed", "callbacks", locale=locale), show_alert=True
)
banned = await app.ban_chat_member(group.id, callback.from_user.id)
if group.ban_failed:
banned = await app.ban_chat_member(group.id, callback.from_user.id)
if isinstance(banned, Message):
await banned.delete()
if isinstance(banned, Message):
await banned.delete()
await callback.message.delete()
return