diff --git a/dff/messengers/telegram/messenger.py b/dff/messengers/telegram/messenger.py index b1152c578..07919c3d0 100644 --- a/dff/messengers/telegram/messenger.py +++ b/dff/messengers/telegram/messenger.py @@ -85,7 +85,7 @@ def send_response(self, chat_id: Union[str, int], response: Union[str, dict, Mes with open(attachment.source, "rb") as file: method(chat_id, file, **params) else: - method(chat_id, attachment.source or attachment.id, **params) + method(chat_id, str(attachment.source or attachment.id), **params) else: def cast(file): @@ -99,7 +99,7 @@ def cast(file): cast_to_media_type = types.InputMediaVideo else: raise TypeError(type(file)) - return cast_to_media_type(media=file.source or file.id, caption=file.title) + return cast_to_media_type(media=str(file.source or file.id), caption=file.title) files = map(cast, ready_response.attachments.files) with batch_open_io(files) as media: