File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
app/services/gamebridge/payloads Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ export default class BanPayload extends Payload {
2424 const notificationsChannel = guild . channels . cache . get ( bridge . config . banUnbanChannelId ) ;
2525 if ( ! notificationsChannel ) return ;
2626
27+ const pastBans = await ( await bridge . container . getService ( "Bans" ) ) . getBan ( player . steamId ) ;
28+
2729 const steam = await bridge . container . getService ( "Steam" ) ;
2830 let steamId64 = "" ;
2931 let bannerName = "" ;
@@ -73,12 +75,16 @@ export default class BanPayload extends Payload {
7375 embed . addFields ( f ( "Expiration" , `<t:${ unixTime } :R>` , true ) ) ;
7476 embed . addFields ( f ( "Reason" , reason . substring ( 0 , 1900 ) ) ) ;
7577 embed . addFields ( f ( "Gamemode" , gamemode ?? "GLOBAL" ) ) ;
78+ if ( pastBans ?. numbans ) {
79+ embed . addFields ( f ( "Past Bans" , pastBans . numbans . toString ( ) ) ) ;
80+ }
7681 embed . addFields (
7782 f (
7883 "SteamID" ,
7984 `[${ bannedSteamId64 } ](https://steamcommunity.com/profiles/${ bannedSteamId64 } ) (${ banned . steamId } )`
8085 )
8186 ) ;
87+
8288 embed . setThumbnail ( bannedAvatar ) ;
8389 embed . setColor ( 0xc42144 ) ;
8490 ( notificationsChannel as Discord . TextChannel ) . send ( { embeds : [ embed ] } ) ;
You can’t perform that action at this time.
0 commit comments