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

+4 -3
View File
@@ -77,10 +77,11 @@ module.exports = {
let unixTime = Math.floor(newDt.getTime()/1000);
if (!client.alarmPingQueue[alarm.channel]) client.alarmPingQueue[alarm.channel] = {};
if (!client.alarmPingQueue[alarm.channel][alarm.role]) client.alarmPingQueue[alarm.channel][alarm.role] = [];
let route = alarm.mute ? '-no-role-ping-' : alarm.role;
if (!client.alarmPingQueue[alarm.channel][route]) client.alarmPingQueue[alarm.channel][route] = [];
if (alarm.rules.includes['ban_on_entry']) {
client.alarmPingQueue[alarm.channel][alarm.role].push(
client.alarmPingQueue[alarm.channel][route].push(
new EmbedBuilder()
.setColor(client.config.Colors.Default)
.setDescription(`**Zone Ping - <t:${unixTime}>**\n**${data.player}** was located within **${distance} meters** of the Zone **${alarm.name}** __and has been banned.__`)
@@ -91,7 +92,7 @@ module.exports = {
return;
}
client.alarmPingQueue[alarm.channel][alarm.role].push(
client.alarmPingQueue[alarm.channel][route].push(
new EmbedBuilder()
.setColor(client.config.Colors.Default)
.setDescription(`**Zone Ping - <t:${unixTime}>**\n**${data.player}** was located within **${distance} meters** of the Zone **${alarm.name}**`)