1
Fork 0
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:
Steffo 2016-03-03 15:00:22 +01:00
parent a6a379a946
commit d0f5711c8f

View file

@ -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)