fix(API): highest role position was incorrectly calculated starting from the highest instead of the lowest. fixes #97

This commit is contained in:
41666 2020-12-21 22:08:42 -05:00
parent 5ef9046e0b
commit 1495500f2b

View file

@ -60,7 +60,7 @@ export const getGuild = cacheLayer(
}
return role.position;
}, guildRaw.roles.length - 1);
}, 0);
const roles = guildRaw.roles.map<Role>((role) => ({
id: role.id,