mirror of
https://github.com/civsocit/olgram.git
synced 2023-07-22 01:29:12 +03:00
ban unban
This commit is contained in:
parent
d0f9042fb6
commit
bc5186ba26
@ -72,7 +72,7 @@ async def message_handler(message: types.Message, *args, **kwargs):
|
|||||||
chat_id = int(chat_id)
|
chat_id = int(chat_id)
|
||||||
|
|
||||||
if message.text == "/ban":
|
if message.text == "/ban":
|
||||||
user, _ = await BannedUser.get_or_create(telegram_id=message.from_user.id, bot=bot)
|
user, _ = await BannedUser.get_or_create(telegram_id=chat_id, bot=bot)
|
||||||
await user.save()
|
await user.save()
|
||||||
return SendMessage(chat_id=message.chat.id, text="Пользователь заблокирован")
|
return SendMessage(chat_id=message.chat.id, text="Пользователь заблокирован")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user