fix(Presentation): flip sort direction of memberRoles for color

This commit is contained in:
41666 2020-02-02 14:22:02 -05:00
parent 1148a564ac
commit 16a4445a3f
No known key found for this signature in database
GPG key ID: BC51D07640DC10AF

View file

@ -44,7 +44,7 @@ class PresentationService extends Service {
const serverRoles = await this.discord.getRoles(server.id)
const memberRoles = member.rolesList
.map(id => serverRoles.find(role => role.id === id))
.sort((a, b) => (a.position < b.position ? -1 : 1))
.sort((a, b) => (a.position > b.position ? -1 : 1))
const color = memberRoles.length > 0 ? memberRoles[0].color : 0