This commit is contained in:
BarsTiger
2021-04-13 15:20:55 +03:00
parent ac8dff6682
commit 064839e45b

17
main.py
View File

@@ -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")