Remove no longer required check for startswith

This commit is contained in:
Matthew Adams
2021-04-13 18:03:03 +10:00
parent 2c3df6416f
commit b7b511e87f

19
main.py
View File

@@ -79,19 +79,16 @@ async def on_message(message):
# Unsupported URL, return silently without doing anything # Unsupported URL, return silently without doing anything
return return
if message.content.startswith('https'): await message.channel.send('TikBot downloading video now!')
await message.channel.send('TikBot downloading video now!') downloadResponse = download(url)
downloadResponse = download(url) fileName = downloadResponse['fileName']
fileName = downloadResponse['fileName'] duration = downloadResponse['duration']
duration = downloadResponse['duration'] messages = downloadResponse['messages']
messages = downloadResponse['messages']
print("Downloaded: " + fileName + " For User: " + str(message.author)) print("Downloaded: " + fileName + " For User: " + str(message.author))
if(messages.startswith("Error")): if(messages.startswith("Error")):
await message.channel.send('TikBot has failed you. Consider berating my human if this was not expected.\nMessage: ' + messages) await message.channel.send('TikBot has failed you. Consider berating my human if this was not expected.\nMessage: ' + messages)
return
else:
return return
# Check file size, if it's small enough just send it! # Check file size, if it's small enough just send it!