mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-24 19:59:12 +00:00
fix(Presentation): flip sort direction of memberRoles for color
This commit is contained in:
parent
1148a564ac
commit
16a4445a3f
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue