File size: 628 Bytes
21bc372 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
from akn.utils.database import db
async def reset_bot_tokendl(callback_uuid: str):
await db.alldl_bot.update_one(
{"bots.uuid": callback_uuid},
{"$unset": {
"bots.$.bot_token": "",
"bots.$.is_active": False,
}}
)
async def verify_bot_ownershipdl(user_id: int, uuids: str) -> bool:
return bool(await db.alldl_bot.find_one({
"user_id": user_id,
"bots.uuid": uuids
}))
async def delete_bot_datadl(callback_uuid: str):
await db.alldl_bot.update_one(
{"bots.uuid": callback_uuid},
{"$pull": {"bots": {"uuid": callback_uuid}}}
) |