feature/mute alarm role ping

This commit is contained in:
SowinskiBraeden committed 2023-10-08 11:02:25 -07:00
1 parent c7ada575e9
commit c6b0528621
4 files changed
+73 -10

No files matched your search

+3 -1
View File
@@ -158,10 +158,12 @@ class DayzRBot extends Client {
if (lines[i].includes('killed by Zmb') || lines[i].includes('>) died.')) s = await UpdateLastDeathDate(this, s, lines[i]); // Updates users last death date for non PVP deaths.
}
// Handle alarm pings
for (const [channel_id, data] of Object.entries(this.alarmPingQueue)) {
const channel = this.GetChannel(channel_id);
for (const [role, embeds] of Object.entries(data)) {
channel.send({ content: `<@&${role}>`, embeds: embeds });
if (role == '-no-role-ping-') channel.send({ embeds: embeds });
else channel.send({ content: `<@&${role}>`, embeds: embeds });
}
}