main: Moved the bot to py-cord to get slash commands support

This commit is contained in:
Yuki Joou 2023-02-24 20:31:53 +01:00
parent 00bb477ca2
commit af16f023e9

View file

@ -7,7 +7,7 @@ import random
intents = discord.Intents.default()
intents.message_content = True
client = discord.Client(intents=intents)
bot = discord.Bot(intents=intents)
gifs = {}
with open("gifs.json") as file:
@ -75,7 +75,7 @@ COMMANDS = [
# Discord events
@client.event
@bot.event
async def on_message(message: discord.Message):
if message.author.bot == True:
return
@ -88,4 +88,4 @@ async def on_message(message: discord.Message):
await command_handler(message, message_as_command)
client.run(open("token").read())
bot.run(open("token").read())