1
0
Fork 0
mirror of https://github.com/uhIgnacio/EmoteManager.git synced 2024-08-15 02:23:13 +00:00

paginator: make sure reactions are to the sole message

This commit is contained in:
bmintz 2018-08-11 12:26:07 -05:00
parent 402da00cd9
commit 95048a590c

View file

@ -14,8 +14,8 @@ class Paginator:
def __init__(self, ctx: Context, pages: typing.Iterable, *, timeout=300, delete_message=False, predicate=None,
delete_message_on_timeout=False, text_message=None):
if predicate is None:
def predicate(_, user):
return user == ctx.message.author
def predicate(reaction, user):
return user == ctx.message.author and reaction.message == self._message
self.pages = list(pages)
self.predicate = predicate