From af16f023e96b5f35f115344f4207449893ee629b Mon Sep 17 00:00:00 2001 From: Yuki Joou Date: Fri, 24 Feb 2023 20:31:53 +0100 Subject: [PATCH] main: Moved the bot to py-cord to get slash commands support --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 8fdd36a..cec3ab5 100755 --- a/main.py +++ b/main.py @@ -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())