mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 09:44:50 +00:00
14 lines
420 B
Python
14 lines
420 B
Python
from database import dbname
|
|
|
|
greetingdb = dbname["greetings"]
|
|
|
|
async def is_welcome(chat_id: int) -> bool:
|
|
return bool(await greetingdb.find_one({"chat_id": chat_id}))
|
|
|
|
async def toggle_welcome(chat_id: int):
|
|
if await is_welcome(chat_id):
|
|
await greetingdb.delete_one({"chat_id": chat_id})
|
|
else:
|
|
await greetingdb.insert_one({"chat_id": chat_id})
|
|
|
|
# todo other features for custom welcome here
|