Update
This commit is contained in:
parent
7d0646d957
commit
516dc0ad8f
1 changed files with 4 additions and 2 deletions
6
misc.py
6
misc.py
|
@ -29,11 +29,13 @@ class misc(commands.Cog):
|
||||||
except:
|
except:
|
||||||
await interaction.followup.send(message, ephemeral=True)
|
await interaction.followup.send(message, ephemeral=True)
|
||||||
|
|
||||||
@commands.Cog.listener('on_error')
|
@commands.Cog.event
|
||||||
async def seconderrorhandler(self, event_method, *args, **kwargs):
|
async def on_error(self, event_method, *args, **kwargs):
|
||||||
error = traceback.format_exc()
|
error = traceback.format_exc()
|
||||||
random.shuffle(errormsg)
|
random.shuffle(errormsg)
|
||||||
print(error, file=sys.stderr)
|
print(error, file=sys.stderr)
|
||||||
|
print(args, file=sys.stderr)
|
||||||
|
print(kwargs, file=sys.stderr)
|
||||||
message = f"{errormsg[0]}\n```py\n{error[-1800:]}\n```\n Contact <@{self.bot.owner_id}> if the error persists"
|
message = f"{errormsg[0]}\n```py\n{error[-1800:]}\n```\n Contact <@{self.bot.owner_id}> if the error persists"
|
||||||
try:
|
try:
|
||||||
await interaction.response.send_message(message, ephemeral=True)
|
await interaction.response.send_message(message, ephemeral=True)
|
||||||
|
|
Loading…
Reference in a new issue