Forget return boolean

This commit is contained in:
Yasir Aris M 2024-07-01 07:40:49 +07:00 committed by GitHub
parent 519d936fd9
commit 0424fbbe0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,7 +8,9 @@ async def is_welcome(chat_id: int) -> bool:
async def toggle_welcome(chat_id: int):
if await is_welcome(chat_id):
await greetingdb.delete_one({"chat_id": chat_id})
return False
else:
await greetingdb.insert_one({"chat_id": chat_id})
return True
# todo other features for custom welcome here