From b31573a1ef5c791fd5aad97019b02afc4a92fb67 Mon Sep 17 00:00:00 2001 From: Parker Date: Wed, 10 Jul 2024 16:30:42 -0500 Subject: [PATCH] Move text command error handler --- code/bot.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/bot.py b/code/bot.py index 4483ca4..6735522 100644 --- a/code/bot.py +++ b/code/bot.py @@ -4,6 +4,7 @@ import os import requests import config +from tree import Tree class MyBot(commands.Bot): @@ -12,6 +13,7 @@ class MyBot(commands.Bot): command_prefix="***", activity=discord.Game(name="music!"), intents=discord.Intents.default(), + tree_cls=Tree ) async def setup_hook(self): @@ -43,6 +45,11 @@ async def on_ready(): config.LOG.info("Startup complete. Sync slash commands by DMing the bot ***sync") +@bot.event +async def on_command_error(ctx, error): + return + + @tasks.loop(minutes=45) async def get_access_token(): auth_url = "https://accounts.spotify.com/api/token"