Learath2 / discordbot

2 stars 1 forks source link

Feature: Help response commands #1

Open kaitlynia opened 3 years ago

kaitlynia commented 3 years ago

Implement help response commands for providing quick responses to frequently asked questions / requests for information about DDNet/Teeworlds. Moderators would add, edit, and remove responses, and any user could use the main response command to retrieve responses. These responses could also provide links to the DDNet Wiki to show the quick, concise information first, but still provide users with more information as needed.

Example: A user in #questions asks how to aim directly upwards. Another user could use the command !response direction bind to give the user a quick answer with the bind command included.

!add_response <response_trigger> <response> !edit_response <response_trigger> <response> !remove_response <response_trigger>

!response <response_trigger>

It may also be beneficial to provide aliases for response triggers, which moderators could add and remove, as well as a response list for browsing all responses.

!add_alias <response_trigger> <alias> !remove_alias <response_trigger> <alias> !all_responses

Aliases would be included in the output of !all_responses for ease of use. We could also consider a maximum number of aliases and an alias/response trigger length limit so that the command output of !all_responses is always readable. The response list would need to be paginated, probably with the use of arrow emoji reactions like most bots do, or we can just use the paste service.


I could help develop this but my understanding of Rust is pretty limited, so I might need some help. At first I was thinking about using the serde crate as a quick way to store these responses and aliases as JSON, but since we already use SQL for global bans, we might as well create a new table for responses.

Learath2 commented 3 years ago

This entire bot is a rather crude attempt at a bandaid just so things work for now. I'm planning a new one in october that has a more sane structure

kaitlynia commented 3 years ago

Ah alright, in that case I'll only add issues to keep ideas for the next one. Do you plan to create it in Rust again?

Learath2 commented 3 years ago

I think so. The twilight-rs community is small but they are helpful and the codebase is very clean.

I'm more familiar with discord.js aswell but I like how rust handles so far.

I'll probably drop sqlx for either diesel or no abstraction at all. The halfway abstraction provided by sqlx is very meh.

On Sat, Aug 7, 2021, 07:30 lynnya @.***> wrote:

Ah alright, in that case I'll only add issues to keep ideas for the next one. Do you plan to create it in Rust again?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Learath2/discordbot/issues/1#issuecomment-894603050, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADXYBHJYBYWWU5NE25MSTLT3SZHXANCNFSM5BW7L5AA .