XaverStiensmeier / ilarisdiscordbot

A discord bot for the ilaris ttrpg
GNU General Public License v3.0
0 stars 0 forks source link

Bug report #70

Open lukruh opened 4 months ago

lukruh commented 4 months ago

a !bug command, with a message, last chat message and maybe last x lines of the log file to be sent to the bot admins.

lukruh commented 3 months ago

Right now user errors (like missing command arguments) are logged, even when handled completly and commands are still working. I'd generally not re raise handled errors. Maybe log some unexpected errors but not stuff like missing args, that could be used on purpose by the user.. instead we could think about adding a "create bug report" button to any error message, that redirects the answer message to devs, with description from the user..

lukruh commented 3 months ago

we could also think about logging from the main error handler, but handle specific ones directly in the cog class like:

@gcreate.error
async def gcreate_error(self, ctx, error):
    if isinstance(error, commands.MissingRequiredArgument):
        await ctx.send('Some required arguments are missing.')
XaverStiensmeier commented 3 months ago

Right now user errors (like missing command arguments) are logged, even when handled completly and commands are still working. I'd generally not re raise handled errors. Maybe log some unexpected errors but not stuff like missing args, that could be used on purpose by the user.. instead we could think about adding a "create bug report" button to any error message, that redirects the answer message to devs, with description from the user..

Sounds great!

we could also think about logging from the main error handler, but handle specific ones directly in the cog class like:

@gcreate.error
async def gcreate_error(self, ctx, error):
    if isinstance(error, commands.MissingRequiredArgument):
        await ctx.send('Some required arguments are missing.')

Interesting. I wasn't aware of that.