Fix a bug where Pager listens to all reactions from all messages

This commit is contained in:
Natsu Kagami 2020-02-08 14:38:16 -05:00
parent ec63a035e0
commit 290e6229a8
Signed by: nki
GPG key ID: 73376E117CD20735

View file

@ -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(()),