mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-01 07:40:07 +00:00
Fix potential infinite loop in Reaction.users
This commit is contained in:
parent
85495a910c
commit
1a90327202
@ -237,6 +237,9 @@ class Reaction:
|
|||||||
if data:
|
if data:
|
||||||
limit -= len(data)
|
limit -= len(data)
|
||||||
after = Object(id=int(data[-1]['id']))
|
after = Object(id=int(data[-1]['id']))
|
||||||
|
else:
|
||||||
|
# Terminate loop if we received no data
|
||||||
|
limit = 0
|
||||||
|
|
||||||
if guild is None or isinstance(guild, Object):
|
if guild is None or isinstance(guild, Object):
|
||||||
for raw_user in reversed(data):
|
for raw_user in reversed(data):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user