Better way of displaying an error response to the user for components? (this.none)

Hi, I was wondering if you could send an ephemeral message to the user when the interaction component (lets say a button) returns this.none() or do i have to have to pass an argument to this.some() with the error
Solution:
the latter, none and some are only used to determine which handler to use among all the handlers as they are not statically bound to i.e. custom ids or commands due to the dynamicity of that data.
Jump to solution
14 Replies
Solution
Favna
Favna2mo ago
the latter, none and some are only used to determine which handler to use among all the handlers as they are not statically bound to i.e. custom ids or commands due to the dynamicity of that data.
Favna
Favna2mo ago
and returning some from handler A ensures that handler B and C will never run
choke
chokeOP2mo ago
makes sense, but how are handlers sorted by order?
Favna
Favna2mo ago
alphabetically iirc
choke
chokeOP2mo ago
ah okay
Favna
Favna2mo ago
but not explicitly, it follows the order in which Node FS reads files from a directory and loops that way so it goes down directory trees first as well
choke
chokeOP2mo ago
oh it recurses?
Favna
Favna2mo ago
yes sapphire always does commands/a/b/c/d/e/f/mycommand.ts works perfectly fine
choke
chokeOP2mo ago
neat, thanks for the solution though
Favna
Favna2mo ago
@Rhys trying to mark this as answer but @Answer Overflow is giving me a "The application did not respond". The bot status also reports offline.
choke
chokeOP2mo ago
yeah i was also trying to consent to it
Favna
Favna2mo ago
wouldnt be surprised if I'm not the first to report the bot is offline but it cant hurt to do so
Rhys
Rhys2mo ago
He should be back up now sorry about that
Favna
Favna2mo ago
ty ty

Did you find this page helpful?