Skip to content

Commit

Permalink
Create ults.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Badhacker98 authored Oct 18, 2024
1 parent 466bdd4 commit 22b98b6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions shizuchat/modules/helpers/ults.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
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

0 comments on commit 22b98b6

Please sign in to comment.