verbose msgs

This commit is contained in:
Daniel afx 2022-03-24 01:59:21 +02:00
parent afb34d4477
commit 6f8ff2abec

10
main.py
View file

@ -3,11 +3,12 @@ import discord
from discord.ext.commands import Bot from discord.ext.commands import Bot
bot_version = os.environ['version'] bot_version = os.environ['version']
print('] radiobot ' + bot_version + ' starting')
bot_token = os.environ['token'] bot_token = os.environ['token']
print('radiobot ' + bot_version + ' starting')
client = Bot(command_prefix="!") client = Bot(command_prefix="!")
isPlaying = False isPlaying = False
class MyClient(discord.Client): class MyClient(discord.Client):
@ -15,14 +16,13 @@ class MyClient(discord.Client):
print('Logged on as', self.user) print('Logged on as', self.user)
async def on_message(self, message): async def on_message(self, message):
print('msg') print (']' + message.author + '<'+message.content+'>')
# don't respond to ourselves # don't respond to ourselves
if message.author == self.user: if message.author == self.user:
return return
if message.content == 'version': if message.content == 'version':
await message.channel.send('radiobot ' + bot_version) await message.channel.send('] radiobot ' + bot_version)
@client.event @client.event
async def on_voice_state_update(self, member, before, after): async def on_voice_state_update(self, member, before, after):