mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-18 16:28:55 +00:00
Fix a bug where Pager listens to all reactions from all messages
This commit is contained in:
parent
ec63a035e0
commit
290e6229a8
1 changed files with 3 additions and 0 deletions
|
@ -119,6 +119,9 @@ impl<T: Pagination> PaginationHandler<T> {
|
|||
|
||||
impl<T: Pagination> ReactionHandler for PaginationHandler<T> {
|
||||
fn handle_reaction(&mut self, reaction: &Reaction, _is_add: bool) -> CommandResult {
|
||||
if reaction.message_id != self.message.id {
|
||||
return Ok(());
|
||||
}
|
||||
match &reaction.emoji {
|
||||
ReactionType::Unicode(ref s) => match s.as_str() {
|
||||
ARROW_LEFT if self.page == 0 => return Ok(()),
|
||||
|
|
Loading…
Add table
Reference in a new issue