Skip to content

Commit 5aca300

Browse files
author
Francesco Zimbolo
authored
chat.photo.save() edit
Changed the function to check whether that specific instance is a ChatPhoto instance or any other media instance
1 parent 4051a49 commit 5aca300

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

botogram/objects/mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ class FileMixin:
583583
@_require_api
584584
def save(self, path, big=True):
585585
"""Save the file to a particular path"""
586-
if not hasattr("self", "file_id"):
586+
if isinstance(self, ChatPhoto):
587587
if big:
588588
_file_id = self.big
589589
else:

0 commit comments

Comments
 (0)