-
Notifications
You must be signed in to change notification settings - Fork 185
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug.
Typing says the list of roles (member.roles) is a list of integers. String comment says it's a list of Role objects. Closer inspection shows it's a list of snowflakes in string form.
def test(role_id: int, user: Member):
print(role_id, user.roles)produces this output:
role_id = 995239284326006934
user.roles = ['995245160545910794', '995239336842903572', '995239284326006934']
part of the code:
class Member(...):
"""
:ivar List[Role] roles: The list of roles of the member.
"""
roles: List[int]List the steps.
- get a role snowflake in int form
- check whether
role in member.roles - always get false
What you expected.
get false only if the role is not on the user
What you saw.
role_id_as_int in member.roles always returns false
What version of the library did you use?
stable
Version specification
4.3.0b2 with two commits fixing get() function
Code of Conduct
- I agree to follow the contribution requirements.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working