rm - object-Object/discordia-reaction-menu GitHub Wiki
This page details the properties and functions of the discordia-reaction-menu (rm
) library.
Properties
Property | Type | Description |
---|---|---|
choiceReactions | table | Lookup table of all the emoji used for choices, with the emoji as keys and the choice numbers as values. |
reactions | table | Table of all the emoji used as reactions in menus, with words (eg. "exit" ) as keys. |
validReactions | table | Lookup table of all the emoji used as reactions in menus, with the emoji as keys and true as values. |
Functions
rm.Choice(choice)
Parameter | Type |
---|---|
choice | Choice |
Validates a Choice object and sets the type.
Returns: Choice
rm.Menu(menu)
Parameter | Type |
---|---|
menu | Menu |
Validates a Menu object, sets the default timeout if necessary, and sets the type.
Returns: Menu
rm.Page(page)
Parameter | Type |
---|---|
page | Page |
Validates a Page object, sets the default color if necessary, and sets the type.
Returns: Page
rm.send(channel, author, menu, data)
Parameter | Type |
---|---|
channel | Channel |
author | User |
menu | Menu |
data | table |
Starts a reaction menu. data
can be a table containing whatever values you want to pass to the methods of the menu. If nil, it will be set to a blank table.
Returns: nil