From 3e8abef6943fec15104ab3ebdb4f28c8be3366dd Mon Sep 17 00:00:00 2001 From: deflax Date: Wed, 23 Mar 2022 20:13:18 -0400 Subject: [PATCH] remove the class and print tracked message --- main.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 2f9ae5c..a8e3b06 100644 --- a/main.py +++ b/main.py @@ -3,25 +3,26 @@ import discord from discord.ext.commands import Bot bot_version = os.environ['version'] -print('] radiobot ' + bot_version + ' starting') +print('radiobot ' + bot_version + ' starting') bot_token = os.environ['token'] client = Bot(command_prefix="!") isPlaying = False -class MyClient(discord.Client): +class Radio(discord.Client): async def on_ready(self): print('Logged on as', self.user) async def on_message(self, message): - print (']' + message.author.nick + '<' + message.content + '>') # don't respond to ourselves if message.author == self.user: return - if message.content == 'version': + print ('<' + message.author.nick + '> ' + message.content) + + if message.content == '!version': await message.channel.send('] radiobot ' + bot_version) @client.event @@ -37,5 +38,5 @@ class MyClient(discord.Client): print("gg") await self.voiceChannel.disconnect() -client = MyClient() -client.run(bot_token) # Get token for this shit +client = Radio() +client.run(bot_token) # Get tokeun for this shit