mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-14 19:48:57 +01:00
Code cleanup for filename. Filename uses only for sendDocument.
This commit is contained in:
parent
c7f2add463
commit
17b8bb4881
1 changed files with 0 additions and 31 deletions
|
@ -252,7 +252,6 @@ class Bot(TelegramObject):
|
|||
def sendPhoto(self,
|
||||
chat_id,
|
||||
photo,
|
||||
filename=None,
|
||||
caption=None,
|
||||
**kwargs):
|
||||
"""Use this method to send photos.
|
||||
|
@ -264,9 +263,6 @@ class Bot(TelegramObject):
|
|||
Photo to send. You can either pass a file_id as String to resend a
|
||||
photo that is already on the Telegram servers, or upload a new
|
||||
photo using multipart/form-data.
|
||||
filename:
|
||||
File name that shows in telegram message (it is usefull when you
|
||||
send file generated by temp module, for example). [Optional]
|
||||
caption:
|
||||
Photo caption (may also be used when resending photos by file_id).
|
||||
[Optional]
|
||||
|
@ -286,8 +282,6 @@ class Bot(TelegramObject):
|
|||
data = {'chat_id': chat_id,
|
||||
'photo': photo}
|
||||
|
||||
if filename:
|
||||
data['filename'] = filename
|
||||
if caption:
|
||||
data['caption'] = caption
|
||||
|
||||
|
@ -298,7 +292,6 @@ class Bot(TelegramObject):
|
|||
def sendAudio(self,
|
||||
chat_id,
|
||||
audio,
|
||||
filename=None,
|
||||
duration=None,
|
||||
performer=None,
|
||||
title=None,
|
||||
|
@ -321,9 +314,6 @@ class Bot(TelegramObject):
|
|||
Audio file to send. You can either pass a file_id as String to
|
||||
resend an audio that is already on the Telegram servers, or upload
|
||||
a new audio file using multipart/form-data.
|
||||
filename:
|
||||
File name that shows in telegram message (it is usefull when you
|
||||
send file generated by temp module, for example). [Optional]
|
||||
duration:
|
||||
Duration of sent audio in seconds. [Optional]
|
||||
performer:
|
||||
|
@ -346,8 +336,6 @@ class Bot(TelegramObject):
|
|||
data = {'chat_id': chat_id,
|
||||
'audio': audio}
|
||||
|
||||
if filename:
|
||||
data['filename'] = filename
|
||||
if duration:
|
||||
data['duration'] = duration
|
||||
if performer:
|
||||
|
@ -402,7 +390,6 @@ class Bot(TelegramObject):
|
|||
def sendSticker(self,
|
||||
chat_id,
|
||||
sticker,
|
||||
filename=None,
|
||||
**kwargs):
|
||||
"""Use this method to send .webp stickers.
|
||||
|
||||
|
@ -413,9 +400,6 @@ class Bot(TelegramObject):
|
|||
Sticker to send. You can either pass a file_id as String to resend
|
||||
a sticker that is already on the Telegram servers, or upload a new
|
||||
sticker using multipart/form-data.
|
||||
filename:
|
||||
File name that shows in telegram message (it is usefull when you
|
||||
send file generated by temp module, for example). [Optional]
|
||||
reply_to_message_id:
|
||||
If the message is a reply, ID of the original message. [Optional]
|
||||
reply_markup:
|
||||
|
@ -431,9 +415,6 @@ class Bot(TelegramObject):
|
|||
|
||||
data = {'chat_id': chat_id,
|
||||
'sticker': sticker}
|
||||
|
||||
if filename:
|
||||
data['filename'] = filename
|
||||
|
||||
return url, data
|
||||
|
||||
|
@ -442,7 +423,6 @@ class Bot(TelegramObject):
|
|||
def sendVideo(self,
|
||||
chat_id,
|
||||
video,
|
||||
filename=None,
|
||||
duration=None,
|
||||
caption=None,
|
||||
**kwargs):
|
||||
|
@ -456,9 +436,6 @@ class Bot(TelegramObject):
|
|||
Video to send. You can either pass a file_id as String to resend a
|
||||
video that is already on the Telegram servers, or upload a new
|
||||
video file using multipart/form-data.
|
||||
filename:
|
||||
File name that shows in telegram message (it is usefull when you
|
||||
send file generated by temp module, for example). [Optional]
|
||||
duration:
|
||||
Duration of sent video in seconds. [Optional]
|
||||
caption:
|
||||
|
@ -480,8 +457,6 @@ class Bot(TelegramObject):
|
|||
data = {'chat_id': chat_id,
|
||||
'video': video}
|
||||
|
||||
if filename:
|
||||
data['filename'] = filename
|
||||
if duration:
|
||||
data['duration'] = duration
|
||||
if caption:
|
||||
|
@ -494,7 +469,6 @@ class Bot(TelegramObject):
|
|||
def sendVoice(self,
|
||||
chat_id,
|
||||
voice,
|
||||
filename=None,
|
||||
duration=None,
|
||||
**kwargs):
|
||||
"""Use this method to send audio files, if you want Telegram clients to
|
||||
|
@ -511,9 +485,6 @@ class Bot(TelegramObject):
|
|||
Audio file to send. You can either pass a file_id as String to
|
||||
resend an audio that is already on the Telegram servers, or upload
|
||||
a new audio file using multipart/form-data.
|
||||
filename:
|
||||
File name that shows in telegram message (it is usefull when you
|
||||
send file generated by temp module, for example). [Optional]
|
||||
duration:
|
||||
Duration of sent audio in seconds. [Optional]
|
||||
reply_to_message_id:
|
||||
|
@ -532,8 +503,6 @@ class Bot(TelegramObject):
|
|||
data = {'chat_id': chat_id,
|
||||
'voice': voice}
|
||||
|
||||
if filename:
|
||||
data['filename'] = filename
|
||||
if duration:
|
||||
data['duration'] = duration
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue