fix gamertag alarm add
This commit is contained in:
3 files changed
+3
-3
No files matched your search
+1
-1
@@ -363,7 +363,7 @@ module.exports = {
|
|||||||
let alarm = GuildDB.alarms.find(alarm => alarm.name == interaction.values[0]);
|
let alarm = GuildDB.alarms.find(alarm => alarm.name == interaction.values[0]);
|
||||||
let alarmIndex = GuildDB.alarms.indexOf(alarm);
|
let alarmIndex = GuildDB.alarms.indexOf(alarm);
|
||||||
|
|
||||||
let playerStat = GuildDB.playerstats.find(stat => stat.player == interaction.customId.split('-')[2]);
|
let playerStat = GuildDB.playerstats.find(stat => stat.gamertag == interaction.customId.split('-')[2]);
|
||||||
if (playerStat == undefined) return interaction.update({ embeds: [new EmbedBuilder().setColor(client.config.Colors.Yellow).setDescription('**Not Found** This player cannot be found, the gamertag may be incorrect or this player has not logged onto the server before.')], components: [] });
|
if (playerStat == undefined) return interaction.update({ embeds: [new EmbedBuilder().setColor(client.config.Colors.Yellow).setDescription('**Not Found** This player cannot be found, the gamertag may be incorrect or this player has not logged onto the server before.')], components: [] });
|
||||||
|
|
||||||
let add = interaction.customId.split('-')[1] == 'add';
|
let add = interaction.customId.split('-')[1] == 'add';
|
||||||
|
|||||||
+1
-1
@@ -47,7 +47,7 @@ module.exports = {
|
|||||||
|
|
||||||
if (args[0].name == 'set') {
|
if (args[0].name == 'set') {
|
||||||
|
|
||||||
let playerStat = GuildDB.playerstats.find(stat => stat.player == args[0].options[0].value);
|
let playerStat = GuildDB.playerstats.find(stat => stat.gamertag == args[0].options[0].value);
|
||||||
if (playerStat == undefined) return interaction.send({ embeds: [new EmbedBuilder().setColor(client.config.Colors.Yellow).setDescription('**Not Found** This player cannot be found, the gamertag may be incorrect or this player has not logged onto the server before for at least ` 5 minutes `.')] });
|
if (playerStat == undefined) return interaction.send({ embeds: [new EmbedBuilder().setColor(client.config.Colors.Yellow).setDescription('**Not Found** This player cannot be found, the gamertag may be incorrect or this player has not logged onto the server before for at least ` 5 minutes `.')] });
|
||||||
let playerStatIndex = GuildDB.playerstats.indexOf(playerStat);
|
let playerStatIndex = GuildDB.playerstats.indexOf(playerStat);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayz-armbands",
|
"name": "dayz-armbands",
|
||||||
"version": "6.3.11",
|
"version": "6.3.12",
|
||||||
"description": "A General Purpose Discord Bot for DayZ Servers.",
|
"description": "A General Purpose Discord Bot for DayZ Servers.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
|
|||||||
Reference in new issue
Block a user