cronokirby / alchemy

A discord library for Elixir
MIT License
151 stars 34 forks source link

Fix permissions mapping. #65

Closed BenAlbin closed 5 years ago

BenAlbin commented 5 years ago

In the discord documentation, the values 0x00000100,0x00000200 and 0x00080000 do not have permissions associated with them. This led to the @perm_map module attribute not correctly mapping permissions to the correct value. This pull request adds a @nil_flags attribute containing those missing values and correctly maps the remaining permissions.

Permissions.to_list/1 had a similar issue, so I have changed the implementation to instead use the @perm_map to build the list of permissions.