try to debug error

This commit is contained in:
Aaron Riedel 2022-01-29 18:38:13 +01:00
parent 26bb07f7b8
commit 4208fb5d15

7
bot.py
View file

@ -56,7 +56,10 @@ bot.help_command = commands.DefaultHelpCommand(dm_help=False, no_category="Befeh
@bot.event
async def on_command_error(ctx, error):
await ctx.message.delete()
try:
await ctx.message.delete()
except:
print("message not found")
print(error)
em = discord.Embed(title="Error", description=error, colour=0xFF0000)
await ctx.send(content="ups, da ist wohl was schief gegangen :( traurige Bot Geräusche...", embed=em, delete_after=20)
@ -251,7 +254,7 @@ async def start(ctx, role_id):
@bot.command(help="Beende die gestartete Runde PnP", usage="")
@is_gm()
async def stop(ctx):
await ctx.message.delete()
#await ctx.message.delete()
text_file = open("start_id.txt", "r")
start_id = text_file.read()
text_file.close()