SUPER MECH M500
SUPER MECH M500

Reputation: 114

discord.py - Getting all available roles of a guild

I notice there is a method for the Guild object for fetching all roles of a guild. My problem is that I cannot install discord.py==1.3.0 using pip. Method for Guild object only available for 1.3.0 Is there another way to get all the guild's roles in discord.py==1.2.3?

Upvotes: 1

Views: 5586

Answers (2)

Kaito
Kaito

Reputation: 191

Returns a list of the guild’s roles in hierarchy order.

The first element of this list will be the lowest role in the hierarchy.

Once you have list of roles you can iterate through it and get its name, id etc.

Documentation

Upvotes: 1

Download it here: https://pypi.org/project/discord.py/#files and follow the instructions to import

Upvotes: 0

Related Questions