From 064839e45b08c56389400ca04113041b84941c39 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Tue, 13 Apr 2021 15:20:55 +0300 Subject: [PATCH] 1 --- main.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/main.py b/main.py index b8d1296..b7a2dd3 100644 --- a/main.py +++ b/main.py @@ -16,13 +16,12 @@ from discord.ext import commands # | | # |_| -client = discord.Client() token = os.getenv("TOKEN") bot = commands.Bot(command_prefix=commands.when_mentioned_or("/"), description="SnakieCat bot") -@client.event +@bot.event async def on_ready(): - print('Yeah, I am started and my name is {0.user}'.format(client)) + print('Yeah, I am started and my name is {0.user}'.format(bot)) ######################################################################################################################### @@ -148,18 +147,15 @@ class Music(commands.Cog): # | $$$$$$/ # \______/ -@client.event +@bot.event async def on_message(message): - if message.author == client.user: + if message.author == bot.user: return if message.content.startswith('hello'): await message.channel.send('Hello!') - if message.content.startswith('aboba'): - await message.channel.send(':regional_indicator_a: :regional_indicator_b: :regional_indicator_o: :regional_indicator_b: :regional_indicator_a:') - - if message.content.startswith('ABOBA'): + if message.content.startswith('aboba') or message.content.startswith('ABOBA'): await message.channel.send(':regional_indicator_a: :regional_indicator_b: :regional_indicator_o: :regional_indicator_b: :regional_indicator_a:') @@ -170,4 +166,5 @@ async def on_message(message): # / _, _/ /_/ / /| / #/_/ |_|\____/_/ |_/ -client.run(token) +bot.add_cog(Music(bot)) +bot.run("ODI5OTk2MzM3NjEyNzE4MTEw.YHAQUw.UoEzhz7fVG3Wqfr2IhrE14oNqEE")