@bot.message_handler(commands=['download_track'])
def download_track(msg):
bot.send_message(chat_id=msg.chat.id, text='*Send me a link to the track!*')
bot.register_next_step_handler(msg, two_step_of_download_track)
def two_step_of_download_track(msg):
url = msg.text
name = download_track(url)
f = open(file=name, mode='rb')
bot.send_document(chat_id=msg.chat.id, document=f)
f.close()
os.remove(name)
AttributeError: 'str' object has no attribute 'chat'
Thread@bot.message_handler(commands=['download_track'])
4 Nachrichten · –꧁