From 5da3f5139ef0b73c67decb8ba41e542f333ba37a Mon Sep 17 00:00:00 2001 From: jaskaranSM <37726998+jaskaranSM@users.noreply.github.com> Date: Tue, 17 Sep 2019 06:35:10 -0400 Subject: [PATCH] bot: inital message will be a reply to user's message also fixed formatting. --- bot.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bot.py b/bot.py index fee4610..b14d241 100644 --- a/bot.py +++ b/bot.py @@ -17,16 +17,14 @@ def start(update, context): def mirror(update,context): message = update.message.text link = message.replace('/mirror','')[1:] - reply_msg = context.bot.send_message(chat_id=update.message.chat_id, text="Starting Download") + reply_msg = context.bot.send_message(chat_id=update.message.chat_id, reply_to_message_id=update.message.message_id, text="Starting Download") download = ariaTools.add_download(link,[reply_msg,update]) ariaTools.progress_status(context,reply_msg,previous=None) with open('data','r') as f: file_name = f.read() print("File-Name: "+file_name) link = gdriveTools.upload(file_name) - # with open('data','r') as f: - # link = f.read() - msg = ""+str(file_name) +"\n"+link + msg = '{}'.format(link,file_name) context.bot.edit_message_text(text=msg,message_id=reply_msg.message_id,chat_id=reply_msg.chat.id,parse_mode='HTMl') @@ -47,4 +45,4 @@ def main(): updater.start_polling() -main() \ No newline at end of file +main()