fix/admin gamertag link overwrite
This commit is contained in:
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -421,9 +421,9 @@ module.exports = {
|
|||||||
return interaction.reply({ content: 'This interaction is not for you', flags: (1 << 6) });
|
return interaction.reply({ content: 'This interaction is not for you', flags: (1 << 6) });
|
||||||
|
|
||||||
if (interaction.customId.split('-')[1]=='yes') {
|
if (interaction.customId.split('-')[1]=='yes') {
|
||||||
let playerStat = GuildDB.playerstats.find(stat => stat.gamertag == interaction.customId.split('-')[3]);
|
let playerStat = GuildDB.playerstats.find(stat => stat.gamertag == interaction.customId.split('-')[2]);
|
||||||
|
|
||||||
playerStat.discordID = interaction.customId.split('-')[2];
|
playerStat.discordID = interaction.customId.split('-')[3];
|
||||||
|
|
||||||
let playerStatIndex = GuildDB.playerstats.indexOf(playerStat);
|
let playerStatIndex = GuildDB.playerstats.indexOf(playerStat);
|
||||||
GuildDB.playerstats[playerStatIndex] = playerStat;
|
GuildDB.playerstats[playerStatIndex] = playerStat;
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayzr-bot",
|
"name": "dayzr-bot",
|
||||||
"version": "9.4.1",
|
"version": "9.4.2",
|
||||||
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
|
|||||||
Reference in new issue
Block a user