aboutsummaryrefslogtreecommitdiff
path: root/code/bot.py
diff options
context:
space:
mode:
authorParker <contact@pkrm.dev>2024-07-10 16:30:42 -0500
committerParker <contact@pkrm.dev>2024-07-10 16:30:42 -0500
commitb31573a1ef5c791fd5aad97019b02afc4a92fb67 (patch)
tree5cb5cbc283d46183dd6e9052c03d45c654b3bbaf /code/bot.py
parent0a6ba08a6520f01af81cbf20e025c170175c7c03 (diff)
Move text command error handler
Diffstat (limited to 'code/bot.py')
-rw-r--r--code/bot.py7
1 files changed, 7 insertions, 0 deletions
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"