@@ -91,6 +91,8 @@ export default class AdminNotifyPayload extends Payload {
9191 const steam = await bridge . container . getService ( "Steam" ) ;
9292 const avatar = await steam . getUserAvatar ( steamId64 ) ;
9393 const reportedAvatar = await steam . getUserAvatar ( reportedSteamId64 ) ;
94+ const selfReport = player . steamId === reported . steamId ;
95+
9496 if ( message . trim ( ) . length < 1 ) message = "No message provided..?" ;
9597
9698 const embed = new Discord . EmbedBuilder ( )
@@ -131,20 +133,30 @@ export default class AdminNotifyPayload extends Payload {
131133 ) ;
132134 }
133135
134- // You can have a maximum of five ActionRows per message, and five buttons within an ActionRow.
135- const row = new Discord . ActionRowBuilder < Discord . ButtonBuilder > ( ) . addComponents (
136- new Discord . ButtonBuilder ( )
137- . setStyle ( Discord . ButtonStyle . Secondary )
138- . setCustomId ( `${ reportedSteamId64 } _REPORT_KICK` )
139- . setEmoji ( "🥾" )
140- . setLabel ( "KICK Offender" ) ,
141- new Discord . ButtonBuilder ( )
142- . setStyle ( Discord . ButtonStyle . Secondary )
143- . setCustomId ( `${ steamId64 } _REPORT_KICK` )
144- . setEmoji ( "🥾" )
145- . setLabel ( "KICK Reporter" )
146- ) ;
147-
136+ const row = new Discord . ActionRowBuilder < Discord . ButtonBuilder > ( ) ;
137+ if ( selfReport ) {
138+ row . addComponents (
139+ new Discord . ButtonBuilder ( )
140+ . setStyle ( Discord . ButtonStyle . Secondary )
141+ . setCustomId ( `${ reportedSteamId64 } _REPORT_KICK` )
142+ . setEmoji ( "🥾" )
143+ . setLabel ( "KICK Self Reporter" )
144+ ) ;
145+ } else {
146+ // You can have a maximum of five ActionRows per message, and five buttons within an ActionRow.
147+ row . addComponents (
148+ new Discord . ButtonBuilder ( )
149+ . setStyle ( Discord . ButtonStyle . Secondary )
150+ . setCustomId ( `${ reportedSteamId64 } _REPORT_KICK` )
151+ . setEmoji ( "🥾" )
152+ . setLabel ( "KICK Offender" ) ,
153+ new Discord . ButtonBuilder ( )
154+ . setStyle ( Discord . ButtonStyle . Secondary )
155+ . setCustomId ( `${ steamId64 } _REPORT_KICK` )
156+ . setEmoji ( "🥾" )
157+ . setLabel ( "KICK Reporter" )
158+ ) ;
159+ }
148160 try {
149161 await thread . send ( {
150162 content : callAdminRole && `<@&${ callAdminRole . id } >` ,
0 commit comments