zekroTJA / shinpuru

シンプル - Discord Bot with role selection, moderation, karma ranking, a starboard, code execution, raid alerting, backups, a web interface, twitch notifications and more!
https://shnp.de
MIT License
184 stars 37 forks source link

Optimize tag command #439

Closed Kaktushose closed 6 months ago

Kaktushose commented 1 year ago

Type

Enhancement of an existing feature

Description

Problem

All /tag commands (except for /tag list) require the tag name as an option. But remembering all tag names is very hard. This results in:

Solutions

This issue could be resolved in three different ways

a) using choices

The name option could use choices instead.

Pros:

Cons:

b) using autocomplete

autocomplete allows the bot "[...] to dynamically return option suggestions to a user as they type".

Pros:

Cons:

c) using both choices and autocomplete

This approach combines the both solutions discussed prior. The bot would use choices for up to 25 tags. After that, autocomplete would be used instead. This is by far the most complex solution, but it would also provide the best user experience.

Conclusion

From my perspective both as a user and a developer I'd prefer solution b) since tags are more of a niche feature and the cost-benefit factor does not pay off with the other solutions

zekroTJA commented 1 year ago

Requires zekrotja/ken#18.

zekroTJA commented 1 year ago

In the same move, the list command for tags should be made ephemeral.

zekroTJA commented 1 year ago

I've decided on your option B). Command auto completion has now been implemented in Ken and also beein implemented for the tag command. When no input is presented, the full list of tags (capped to 30 at max) is shown to the user, so they don't even need to remember most of the tags at all.

Thank you very much for your feedback! :)