mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-12-04 22:42:21 +00:00
Fix potential infinite loop in Reaction.users
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user