mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Aggiunto il reply a senddocument
This commit is contained in:
parent
a6a379a946
commit
d0f5711c8f
1 changed files with 2 additions and 1 deletions
|
@ -97,7 +97,7 @@ def sendaudio(aud, to):
|
|||
requests.get("https://api.telegram.org/bot" + telegramtoken + "/sendAudio", params=parametri)
|
||||
|
||||
|
||||
def senddocument(doc, to):
|
||||
def senddocument(doc, to, reply=None):
|
||||
"""Manda un file a una chat.
|
||||
:param doc: ID del documento
|
||||
:param to: Destinatario del documento
|
||||
|
@ -105,6 +105,7 @@ def senddocument(doc, to):
|
|||
parametri = {
|
||||
'chat_id': to,
|
||||
'document': doc,
|
||||
'reply_to_message_id': reply
|
||||
}
|
||||
# Manda la richiesta ai server di Telegram.
|
||||
requests.get("https://api.telegram.org/bot" + telegramtoken + "/sendDocument", params=parametri)
|
||||
|
|
Loading…
Reference in a new issue