murray-rothbot / client-discord

MIT License
1 stars 0 forks source link

[Refactor]: standardization of messages appearance and error catching/presentation #56

Closed vforvilela closed 1 year ago

vforvilela commented 1 year ago
  1. Creation of a defaultResponse, so all commands start by invoking it:

    async handler(interaction: CommandInteraction): Promise<any> {
    const response = defaultResponse()
    const embed = response.embeds[0]
    const fields = embed.fields
  2. The class CommandExceptionFilter is responsable to deal with exceptions not captured by the commands. 2.1. If it's a ValidationException (thrown by the class-validator) it presents it like this: image Be my guess to change it. 2.2. It's a generic error, it shows a generic error: image I shows the current status off each service, by calling the health end point. Again, change at will.

  3. I tried to keep the icons as creative and as standard across commands as possible.

MiguelMedeiros commented 1 year ago

GREAT PR!!!! Thanks a lot!!!