Vhoyon / Discord-Bot

A Bot that we make for learning stuff out and having fun!
MIT License
1 stars 3 forks source link

Add reactions based events #30

Closed V-ed closed 6 years ago

V-ed commented 6 years ago

This could make for some interesting behaviors such as visual confirmation (see example below) or voting!

example

Just some explanations for that example : The bot could send a message with default reactions (choices) of which the user would add a reaction (by clicking on the reaction he wants) to input his choice.

In other words, this would enable a new interaction method with the bot, which is always useful.

V-ed commented 6 years ago

EDIT : This behavior of creating ReactForms easily is tracked in #124.


TODO : Track the message ID of the form in the buffer for the TextChannel and the available options.

A ReactOption object could be created to track what option is what and what has been selected. This could be part of a ReactMessage where the id of the message would be stored (the first line of this comment).

I imagine something like this :

public class ReactMessage {

    public ReactMessage(String messageId, ReactOption... options){
        [...]
    }

}

and this for the ReactOption :

public class ReactOption {

    public ReactOption(String emoji, int countBeforeChosen){
        [...]
    }

}
V-ed commented 6 years ago

Issue moved to Vhoyon/Vramework #2 via ZenHub