Move text command error handler

This commit is contained in:
Parker M. 2024-07-10 16:30:42 -05:00
parent 0a6ba08a65
commit b31573a1ef
No known key found for this signature in database
GPG Key ID: 95CD2E0C7E329F2A

View File

@ -4,6 +4,7 @@ import os
import requests import requests
import config import config
from tree import Tree
class MyBot(commands.Bot): class MyBot(commands.Bot):
@ -12,6 +13,7 @@ class MyBot(commands.Bot):
command_prefix="***", command_prefix="***",
activity=discord.Game(name="music!"), activity=discord.Game(name="music!"),
intents=discord.Intents.default(), intents=discord.Intents.default(),
tree_cls=Tree
) )
async def setup_hook(self): 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") 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) @tasks.loop(minutes=45)
async def get_access_token(): async def get_access_token():
auth_url = "https://accounts.spotify.com/api/token" auth_url = "https://accounts.spotify.com/api/token"