mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-19 00:38:54 +00:00
Don't respond to the bot's pagination reaction
This commit is contained in:
parent
e4a55d9958
commit
a50f44ad90
1 changed files with 2 additions and 0 deletions
|
@ -144,6 +144,7 @@ async fn paginate_with_first_message(
|
|||
let mut reaction_collector = {
|
||||
// message.await_reactions(ctx).removed(true).build();
|
||||
let message_id = message.id;
|
||||
let me = message.author.id;
|
||||
collector::collect(&ctx.shard, move |event| {
|
||||
match event {
|
||||
serenity::all::Event::ReactionAdd(r) => Some(r.reaction.clone()),
|
||||
|
@ -151,6 +152,7 @@ async fn paginate_with_first_message(
|
|||
_ => None,
|
||||
}
|
||||
.filter(|r| r.message_id == message_id)
|
||||
.filter(|r| r.user_id.is_some_and(|id| id != me))
|
||||
})
|
||||
};
|
||||
let mut page = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue