chore: role icon property

This commit is contained in:
izzy
2026-05-17 21:57:13 +01:00
parent 7de00aa7ce
commit 64d449d7d3
2 changed files with 19 additions and 0 deletions
+7
View File
@@ -271,6 +271,13 @@ export class Message {
return this.masquerade?.colour ?? this.member?.roleColour;
}
/**
* Get the role colour for this message
*/
get roleIcon(): File | null | undefined {
return this.member?.roleIcon;
}
/**
* Get the avatar URL for this message
*/
+12
View File
@@ -156,6 +156,18 @@ export class ServerMember {
}
}
/**
* Member's current role icon.
*/
get roleIcon(): File | null | undefined {
const roles = this.orderedRoles.filter((x) => x.colour);
if (roles.length > 0) {
return roles[roles.length - 1].icon;
} else {
return null;
}
}
/**
* Member's ranking
* Smaller values are ranked as higher priority