galacticwarrior9 / IslamBot

A Discord bot that supports Qur'an, hadith, prayer times, tafsir and more.
GNU General Public License v3.0
87 stars 36 forks source link

Make all error messages ephemeral #57

Open itzmk21 opened 1 year ago

itzmk21 commented 1 year ago

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

itzmk21 commented 1 year ago

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?