From 4628a05502399a5799c3c5be2afd289c6eda72af Mon Sep 17 00:00:00 2001 From: sgoudham Date: Fri, 24 Jul 2020 21:57:33 +0100 Subject: [PATCH] Simplifying commentary --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index c62e9218..41f15508 100644 --- a/main.py +++ b/main.py @@ -98,10 +98,10 @@ if __name__ == '__main__': client.load_extension(ext) -# Bot event making sure that messages sent by the bot do nothing @client.event async def on_message(message): - # Making sure that the bot does not take in its own messages + """Make sure bot messages are not tracked""" + if message.author.bot: return @@ -112,6 +112,7 @@ async def on_message(message): @tasks.loop(seconds=120, reconnect=True) async def change_status(): """Creating Custom Statuses as a Background Task""" + global counter # Waiting for the bot to ready await client.wait_until_ready() @@ -146,7 +147,6 @@ async def change_status(): change_status.start() -# Bot Status on Discord @client.event async def on_ready(): """Displaying if Bot is Ready"""