mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Add error handlers
This commit is contained in:
parent
f3e4e88ffd
commit
58256a317f
1 changed files with 5 additions and 0 deletions
5
main.py
5
main.py
|
@ -35,6 +35,11 @@ async def on_application_command_error(ctx: discord.ApplicationContext, error: E
|
||||||
await ctx.respond("Application Command Error: `%r`" % error)
|
await ctx.respond("Application Command Error: `%r`" % error)
|
||||||
|
|
||||||
|
|
||||||
|
@bot.listen("on_command_error")
|
||||||
|
async def on_command_error(ctx: discord.ApplicationContext, error: Exception):
|
||||||
|
await ctx.respond("Command Error: `%r`" % error)
|
||||||
|
|
||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
console.log("Logged in as", bot.user)
|
console.log("Logged in as", bot.user)
|
||||||
|
|
Loading…
Reference in a new issue