Azoy / Sword

Discord library for Swift
https://azoy.github.io/Sword
MIT License
179 stars 52 forks source link

Check if user has permission (master) #64

Closed ghost closed 5 years ago

ghost commented 5 years ago

How can I check if a user has a certain permission (for example, "ADMINISTRATOR")?

Azoy commented 5 years ago

If you have a member, you can simply do member.hasPermission(.administrator). You can find a list of permissions at https://azoy.github.io/Sword