Skip to content

Commit

Permalink
Update mongo.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Badhacker98 authored Oct 18, 2024
1 parent b9f9c7b commit fae934d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions shizuchat/modules/helpers/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ async def group_on():
if not user:
return await modedb.insert_one({"chat_id": chat_id})

def get_file_id(msg: Message):
if not msg.media: return None
for message_type in ("photo", "animation", "audio", "document", "video", "video_note", "voice", "sticker"):
obj = getattr(msg, message_type)
if obj:
setattr(obj, "message_type", message_type)
return obj

async def group_off():
chat_id = 123
modelist[chat_id] = False
Expand Down

0 comments on commit fae934d

Please sign in to comment.