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 9993e10 commit aef3c04
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions shizuchat/modules/helpers/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ async def group_on():
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
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
Expand Down

0 comments on commit aef3c04

Please sign in to comment.