Commit Graph

10 Commits (46b0981b6a51622342fea9ed8d159abad59883d4)

Author SHA1 Message Date
trivernis fbb87fe58a
Change order of help entries to correspond to button ordering
Signed-off-by: trivernis <trivernis@protonmail.com>
3 years ago
trivernis bb153a10a5
Add help display for menus
Signed-off-by: trivernis <trivernis@protonmail.com>
3 years ago
trivernis bbf9f1ef93
Add ephemeral message and use it for most music command answers
Signed-off-by: trivernis <trivernis@protonmail.com>
3 years ago
trivernis 87cfba1bc8
Change menu pages to be wrapped in page type
The pages of a menu are now wrapped in an enum that contains either
a builder function or a static CreateMessage. The builder function
is used for the now playing message to always return the currently
playing song instead of mapping a static song. This solves the problem
that the old page is being rendered when the page is recreated because
of being sticky.

Signed-off-by: trivernis <trivernis@protonmail.com>
3 years ago
trivernis 411dd83240
Add controls to now playing message and fix sticky menu
Signed-off-by: trivernis <trivernis@protonmail.com>
3 years ago
trivernis 071e5f52fd
Change menu recreation now working without cloning
Signed-off-by: trivernis <trivernis@protonmail.com>
3 years ago
trivernis c6b80f8abd
Add sticky option to menus
Menus can now be created as sticky menus. When new messages appear
in the channel, the sticky message will be resent to be the latest
one in the channel. It only get's recreated every ten seconds max
to avoid getting ratelimited.
To work with recreatable menus, the message handle returned by
the menu is now wrapped into an Arc<RwLock<>>.

Signed-off-by: trivernis <trivernis@protonmail.com>
3 years ago
trivernis abc97bea45
Change MessageHandle to be a struct wrapping the IDs
Signed-off-by: trivernis <trivernis@protonmail.com>
3 years ago
trivernis cbdb2e3265
Change add_control on menu builder to pass the function instead of the Arc
Signed-off-by: trivernis <trivernis@protonmail.com>
3 years ago
trivernis dc8a84c51e
Implement custom embed menu in subcrate
Signed-off-by: trivernis <trivernis@protonmail.com>
3 years ago