IslamBot icon indicating copy to clipboard operation
IslamBot copied to clipboard

Make all error messages ephemeral

Open itzmk21 opened this issue 1 year ago • 1 comments

This would take advantage of the ephemeral ability and clean up the channel by having no error messages

itzmk21 avatar Sep 02 '22 02:09 itzmk21

Some commands interaction response is defer. This can be ephemeral, and likewise make the followup ephemeral too (which isn't a good idea for /quran etc.). By having defer(ephemeral=False) (which is the default value), any error message from followup.send() is also visible and impossible to have ephemeral. I suspect this to be a problem with the API. A solution would be to sacrifce the Bot's thinking, for error messages to be ephemeral or have error messages visible.

Some commands response is send_message so error messages are fully possible being ephemeral. However, commands like these raise the question to why they weren't deferred to in the first place.

Example: /dua response is to defer, therefore its error message has to be visible /hadith response is to send_message, therefore its error message can be ephemeral.

This would break the bot's general consistency of having some commands' error messages visible while some not. The /mushaf "page 1 to 604" error message is the only one that is ephemeral while the rest aren't (except setting prayer times etc since those are always ephemeral regardless of error or not.)

My point is that should the bot be deferring all responses, and have all error messages visible? Or should the bot always respond by sending a message (never defer), and have error messages ephemeral?

itzmk21 avatar Sep 03 '22 02:09 itzmk21