File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 "@vladfrangu/async_event_emitter" : " ^2.4.6" ,
3232 "json-with-bigint" : " ^3.4.4" ,
3333 "solid-js" : " ^1.9.6" ,
34- "stoat-api" : " 0.12.0 " ,
34+ "stoat-api" : " 0.13.5 " ,
3535 "ulid" : " ^3.0.2"
3636 },
3737 "devDependencies" : {
Original file line number Diff line number Diff line change @@ -111,7 +111,10 @@ export class ServerMember {
111111 * Ordered list of roles for this member, from lowest to highest priority.
112112 */
113113 get orderedRoles ( ) : ( Partial <
114- Omit < Role , "permissions" > & { permissions : { a : bigint ; d : bigint } }
114+ Omit < Role , "permissions" | "icon" > & {
115+ permissions : { a : bigint ; d : bigint } ;
116+ icon ?: File ;
117+ }
115118 > & { id : string } ) [ ] {
116119 const server = this . server ! ;
117120 return (
@@ -128,7 +131,10 @@ export class ServerMember {
128131 * Member's currently hoisted role.
129132 */
130133 get hoistedRole ( ) : Partial <
131- Omit < Role , "permissions" > & { permissions : { a : bigint ; d : bigint } }
134+ Omit < Role , "permissions" | "icon" > & {
135+ permissions : { a : bigint ; d : bigint } ;
136+ icon ?: File ;
137+ }
132138 > | null {
133139 const roles = this . orderedRoles . filter ( ( x ) => x . hoist ) ;
134140 if ( roles . length > 0 ) {
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import type { Role as APIRole } from "stoat-api";
22
33import type { Client } from "../Client.js" ;
44
5+ import { File } from "./File.js" ;
6+
57/**
68 * Server Role
79 */
@@ -11,6 +13,7 @@ export class ServerRole {
1113
1214 readonly id : string ;
1315 readonly name : string ;
16+ readonly icon ?: File ;
1417 readonly permissions : {
1518 a : bigint ;
1619 d : bigint ;
@@ -32,6 +35,7 @@ export class ServerRole {
3235
3336 this . id = id ;
3437 this . name = data . name ;
38+ this . icon = data . icon ? new File ( client , data . icon ) : undefined ;
3539 this . permissions = {
3640 a : BigInt ( data . permissions . a ) ,
3741 d : BigInt ( data . permissions . d ) ,
You can’t perform that action at this time.
0 commit comments