From f77eabf7c3a2db5f47fea421c0f023290b663c5c Mon Sep 17 00:00:00 2001 From: Matthew Adams Date: Tue, 2 Mar 2021 18:52:57 +1000 Subject: [PATCH] Fix some brain farts --- main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.py b/main.py index 77c2ede..9e1c54d 100644 --- a/main.py +++ b/main.py @@ -14,12 +14,16 @@ async def on_ready(): @client.event async def on_message(message): + if(not message.channel.name.startswith("tik-tok")): + return + if message.author == client.user: return if message.content.startswith('$hello'): await message.channel.send('Hello!') + downloadResult = "" if message.content.startswith('https'): await message.channel.send('TikBot downloading video now!') downloadResult = download(message.content) @@ -28,6 +32,8 @@ async def on_message(message): if(downloadResult.startswith("Error")): await message.channel.send('TikBot has failed you. Consider berating my human if this was not expected.') return + else: + return # Check file size, if it's small enough just send it! fileSize = os.stat(downloadResult).st_size