@@ -98,6 +98,8 @@ pub struct InteractionMember {
9898#[ cfg( test) ]
9999mod tests {
100100 use super :: { InteractionChannel , InteractionDataResolved , InteractionMember } ;
101+ use crate :: guild:: RoleColors ;
102+ use crate :: user:: PrimaryGuild ;
101103 use crate :: {
102104 channel:: {
103105 Attachment , ChannelType , Message ,
@@ -193,6 +195,7 @@ mod tests {
193195 mfa_enabled : None ,
194196 name : "test" . to_owned ( ) ,
195197 premium_type : None ,
198+ primary_guild : None ,
196199 public_flags : None ,
197200 system : None ,
198201 verified : None ,
@@ -249,6 +252,11 @@ mod tests {
249252 Id :: new ( 400 ) ,
250253 Role {
251254 color : 0 ,
255+ colors : RoleColors {
256+ primary_color : 0 ,
257+ secondary_color : None ,
258+ tertiary_color : None ,
259+ } ,
252260 hoist : true ,
253261 icon : None ,
254262 id : Id :: new ( 400 ) ,
@@ -281,6 +289,12 @@ mod tests {
281289 mfa_enabled : Some ( true ) ,
282290 name : "test" . to_owned ( ) ,
283291 premium_type : Some ( PremiumType :: Nitro ) ,
292+ primary_guild : Some ( PrimaryGuild {
293+ identity_guild_id : Some ( Id :: new ( 169_256_939_211_980_800 ) ) ,
294+ identity_enabled : Some ( true ) ,
295+ tag : Some ( "DISC" . to_owned ( ) ) ,
296+ badge : Some ( "1269e74af4df7417b13759eae50c83dc" . parse ( ) . unwrap ( ) ) ,
297+ } ) ,
284298 public_flags : Some (
285299 UserFlags :: PREMIUM_EARLY_SUPPORTER | UserFlags :: VERIFIED_DEVELOPER ,
286300 ) ,
@@ -502,10 +516,22 @@ mod tests {
502516 Token :: Str ( "400" ) ,
503517 Token :: Struct {
504518 name : "Role" ,
505- len : 9 ,
519+ len : 10 ,
506520 } ,
507521 Token :: Str ( "color" ) ,
508522 Token :: U32 ( 0 ) ,
523+ Token :: Str ( "colors" ) ,
524+ Token :: Struct {
525+ name : "RoleColors" ,
526+ len : 3 ,
527+ } ,
528+ Token :: Str ( "primary_color" ) ,
529+ Token :: U32 ( 0 ) ,
530+ Token :: Str ( "secondary_color" ) ,
531+ Token :: None ,
532+ Token :: Str ( "tertiary_color" ) ,
533+ Token :: None ,
534+ Token :: StructEnd ,
509535 Token :: Str ( "hoist" ) ,
510536 Token :: Bool ( true ) ,
511537 Token :: Str ( "id" ) ,
@@ -531,7 +557,7 @@ mod tests {
531557 Token :: Str ( "300" ) ,
532558 Token :: Struct {
533559 name : "User" ,
534- len : 17 ,
560+ len : 18 ,
535561 } ,
536562 Token :: Str ( "accent_color" ) ,
537563 Token :: None ,
@@ -571,6 +597,26 @@ mod tests {
571597 Token :: Str ( "premium_type" ) ,
572598 Token :: Some ,
573599 Token :: U8 ( 2 ) ,
600+ Token :: Str ( "primary_guild" ) ,
601+ Token :: Some ,
602+ Token :: Struct {
603+ name : "PrimaryGuild" ,
604+ len : 4 ,
605+ } ,
606+ Token :: Str ( "identity_guild_id" ) ,
607+ Token :: Some ,
608+ Token :: NewtypeStruct { name : "Id" } ,
609+ Token :: Str ( "169256939211980800" ) ,
610+ Token :: Str ( "identity_enabled" ) ,
611+ Token :: Some ,
612+ Token :: Bool ( true ) ,
613+ Token :: Str ( "tag" ) ,
614+ Token :: Some ,
615+ Token :: Str ( "DISC" ) ,
616+ Token :: Str ( "badge" ) ,
617+ Token :: Some ,
618+ Token :: Str ( "1269e74af4df7417b13759eae50c83dc" ) ,
619+ Token :: StructEnd ,
574620 Token :: Str ( "public_flags" ) ,
575621 Token :: Some ,
576622 Token :: U64 ( 131_584 ) ,
0 commit comments