Skip to content

Commit 5406c09

Browse files
Techbot121Meta Construct
authored andcommitted
add ban amount to ban embed
1 parent 6992670 commit 5406c09

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/services/gamebridge/payloads/BanPayload.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff 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] });

0 commit comments

Comments
 (0)