Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unnecessary error details #15

Open
THEWHITEBOY503 opened this issue Jun 4, 2023 · 1 comment
Open

[BUG] Unnecessary error details #15

THEWHITEBOY503 opened this issue Jun 4, 2023 · 1 comment
Assignees
Labels
Backburner A fix has been partially completed, but deprioritized to focus on more important issues bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@THEWHITEBOY503
Copy link
Owner

Describe the bug
When an error is encountered, it spits out a bunch of extra error details. For example:

Whoops, that's an error! Please share this information with my developers:
Traceback (most recent call last):
  File "/home/conner/.local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 1350, in invoke
    await ctx.command.invoke(ctx)
  File "/home/conner/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 1015, in invoke
    await self.prepare(ctx)
  File "/home/conner/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 919, in prepare
    if not await self.can_run(ctx):
  File "/home/conner/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 1280, in can_run
    return await discord.utils.async_all(predicate(ctx) for predicate in predicates)
  File "/home/conner/.local/lib/python3.10/site-packages/discord/utils.py", line 698, in async_all
    for elem in gen:
  File "/home/conner/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 1280, in <genexpr>
    return await discord.utils.async_all(predicate(ctx) for predicate in predicates)
  File "/home/conner/.local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 2197, in predicate
    raise MissingPermissions(missing)
discord.ext.commands.errors.MissingPermissions: You are missing Administrator permission(s) to run this command.

...the only information needed in this error is discord.ext.commands.errors.MissingPermissions: You are missing Administrator permission(s) to run this command.

To Reproduce
Run a command that yields an error.

Expected behavior
A two line output, one line explaining the bot encountered an error, and one line with the error message.

Additional context
Would also like to filter out Command not found errors.

@THEWHITEBOY503 THEWHITEBOY503 added the bug Something isn't working label Jun 4, 2023
@THEWHITEBOY503 THEWHITEBOY503 self-assigned this Jun 4, 2023
@THEWHITEBOY503 THEWHITEBOY503 added enhancement New feature or request In-progress A feature that has been acknowledged and is being worked on labels Jun 5, 2023
@THEWHITEBOY503
Copy link
Owner Author

Added some error handling tidbits, and got rid of command not found errors, but some errors still produce long outputs.

@THEWHITEBOY503 THEWHITEBOY503 added good first issue Good for newcomers Backburner A fix has been partially completed, but deprioritized to focus on more important issues labels Jun 5, 2023
@THEWHITEBOY503 THEWHITEBOY503 removed the In-progress A feature that has been acknowledged and is being worked on label Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backburner A fix has been partially completed, but deprioritized to focus on more important issues bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant