discord-bot-creator icon indicating copy to clipboard operation
discord-bot-creator copied to clipboard

Helpful Error Messages

Open m5x5 opened this issue 3 years ago • 3 comments

Describe the problem If someone is creating his discord bot, there are many things that can go wrong. The default behavior of the discord bot creator is just to silently continue and not tell the user about what exactly went wrong and how to fix it.

To Reproduce Steps to reproduce the behavior:

  1. Create a test command
  2. Let it send a message to a non-existent channel
  3. See helpful error
  4. Create "Find emoji" action
  5. Make it search for an invalid emoji
  6. Notice that there is no error

Expected behavior We need to have an error just like for the "Send Message" action that lets the user know what exactly they need to do to fix the issue.

Screenshots image image

Additional context You can find the actions that need to be modified in resources/bot/actions. Here is the function that you have to call to display a new error message:

this.displayError(data, cache, `Could not find channel: ${find}`);

Feel free to take a look at resources/bot/actions/find_channel.js for reference.

m5x5 avatar Oct 15 '21 04:10 m5x5