fix
This commit is contained in:
1 file changed
+2
-2
@@ -28,7 +28,7 @@ module.exports = {
|
|||||||
run: async (client, interaction, args, { GuildDB }) => {
|
run: async (client, interaction, args, { GuildDB }) => {
|
||||||
|
|
||||||
if (!client.exists(GuildDB.playerstats)) {
|
if (!client.exists(GuildDB.playerstats)) {
|
||||||
GuildDB.playerstats = [];
|
GuildDB.playerstats = [{}];
|
||||||
this.dbo.collection("guilds").updateOne({ "server.serverID": guild.serverID }, {
|
this.dbo.collection("guilds").updateOne({ "server.serverID": guild.serverID }, {
|
||||||
$set: {
|
$set: {
|
||||||
"server.playerstats": []
|
"server.playerstats": []
|
||||||
@@ -38,7 +38,7 @@ module.exports = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let playerStat = GuildDB.playerstats.find(stat => stat.player == args[0].value[0]);
|
let playerStat = GuildDB.playerstats.find(stat => stat.player == args[0].value[0] );
|
||||||
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 `.')] });
|
||||||
|
|
||||||
playerStat.discordID = interaction.member.user.id;
|
playerStat.discordID = interaction.member.user.id;
|
||||||
|
|||||||
Reference in new issue
Block a user