mirror of
https://github.com/thewesker/Video-Archive-Discord-Bot.git
synced 2025-12-20 04:11:05 -05:00
Remove no longer required check for startswith
This commit is contained in:
19
main.py
19
main.py
@@ -79,19 +79,16 @@ async def on_message(message):
|
||||
# Unsupported URL, return silently without doing anything
|
||||
return
|
||||
|
||||
if message.content.startswith('https'):
|
||||
await message.channel.send('TikBot downloading video now!')
|
||||
downloadResponse = download(url)
|
||||
fileName = downloadResponse['fileName']
|
||||
duration = downloadResponse['duration']
|
||||
messages = downloadResponse['messages']
|
||||
await message.channel.send('TikBot downloading video now!')
|
||||
downloadResponse = download(url)
|
||||
fileName = downloadResponse['fileName']
|
||||
duration = downloadResponse['duration']
|
||||
messages = downloadResponse['messages']
|
||||
|
||||
print("Downloaded: " + fileName + " For User: " + str(message.author))
|
||||
print("Downloaded: " + fileName + " For User: " + str(message.author))
|
||||
|
||||
if(messages.startswith("Error")):
|
||||
await message.channel.send('TikBot has failed you. Consider berating my human if this was not expected.\nMessage: ' + messages)
|
||||
return
|
||||
else:
|
||||
if(messages.startswith("Error")):
|
||||
await message.channel.send('TikBot has failed you. Consider berating my human if this was not expected.\nMessage: ' + messages)
|
||||
return
|
||||
|
||||
# Check file size, if it's small enough just send it!
|
||||
|
||||
Reference in New Issue
Block a user