Fix potential infinite loop in Reaction.users

This commit is contained in:
Rapptz 2022-06-16 18:56:42 -04:00
parent 85495a910c
commit 1a90327202

View File

@ -237,6 +237,9 @@ class Reaction:
if data:
limit -= len(data)
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):
for raw_user in reversed(data):