Coder Social home page Coder Social logo

Comments (12)

pydis-bot avatar pydis-bot commented on May 18, 2024

Comment from Leon Sandøy:

mentioned in merge request !47

from bot.

MarkKoz avatar MarkKoz commented on May 18, 2024

It seems we are moving away from embeds in favour of plain messages because they have less clutter. The downside is that they are no longer as prominent as they would be if they were embeds.

Which direction to take is still open for discussion.

from bot.

MarkKoz avatar MarkKoz commented on May 18, 2024

Some additional context:

The default error handler currently does not use embeds. However, some commands/cogs have their own error handlers which do use embeds. For example: utils and snekbox. These embeds also take a random error message to display in the title.

from bot.

scragly avatar scragly commented on May 18, 2024

Closing this in favour of #131

from bot.

MarkKoz avatar MarkKoz commented on May 18, 2024

I think it's best to keep this a separate issue from #131 as this issue is concerned with formatting of errors in all cogs while the other is concerned with coverage of errors in the main error handler.

from bot.

lemonsaurus avatar lemonsaurus commented on May 18, 2024

In #1058, we're changing the error handler so that all errors will return an embed. It looks like this:

image

This isn't perfect, but it adds some sorely needed sanity and looks slightly more professional. However, we should probably open a pull request that will turn these two embeds into one.

from bot.

Xithrius avatar Xithrius commented on May 18, 2024

#1058 has been merged.

However, we should probably open a pull request that will turn these two embeds into one.

I'm not sure if it would look much better as one embed, since it may be a bit messy. Having this as 2 different embeds separates the subjects into an "error" and "help" field, may not be the best when put together.

Thoughts, @MarkKoz?

from bot.

MarkKoz avatar MarkKoz commented on May 18, 2024

Hard to say without seeing what it'd look like. It could probably get away with only showing the usage code block from the help embed - the aliases and descriptions can be omitted.

In any case, there are some situations where showing the help isn't even useful. The screenshot above perfectly illustrates that. The help message is more useful when an argument is missing or if the error message is too generic (like an invalid type).

This is just one aspect of the issue. I believe there are still places where commands directly output error messages rather than raising exceptions. They inconsistently use embeds or plain messages, and the formats of those may also be inconsistent.

from bot.

D0rs4n avatar D0rs4n commented on May 18, 2024

I read back the whole issue, starting from the beginning.
I believe most of the times showing one embed with the usage (like in Sir Lancebot's error handler.) is more consistent than the current one (Showing two embeds)
But we can make specific cases for specific errors, like not showing the usage just the error message!(Although, at that point, I don't think it's a huge problem that it shows the usage, even if it seems it is not helpful.)
(I'd be interested in helping implement this)

from bot.

mbaruh avatar mbaruh commented on May 18, 2024
  1. Regarding the OP, I don't think it's necessary for all error messages to be in the same format. The bot is massive and is comprised of extensions, some of which have their own unique aspects. For example, the default error message for a bad or missing argument is handled by the error handler and is posted as an embed, but for some moderation commands there might be errors which are out of the moderator's control (e.g the member left the server). In the latter case it's more useful to have a concise error message in plaintext to explain what happened, instead of dumping the help embed, which is annoying especially when it happens in a public channel. To summarize, I think it's ok for different features to display errors in ways that are appropriate to them.
  2. Another point in the OP is whether all plaintext errors should have emojis. I think they're nice visual cues. Not sure if I would bother enforcing it, but I take care to add them when writing plaintext errors.
  3. I think we should merge the error and the help embed like in sir-lancebot. This also simplifies a possible migration of the error handler to bot-core. Most people here seem to be in favor, so unless there are strong opinions against let's stick with this direction from now on.

from bot.

wookie184 avatar wookie184 commented on May 18, 2024

One option for merging the embeds now is something like this with buttons, where the "Help" button could send an ephemeral message with the contents of the help command.
image

from bot.

mbaruh avatar mbaruh commented on May 18, 2024

Looks good. Let's just go for it.

from bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.