This commit is contained in:
SowinskiBraeden committed 2023-03-28 19:12:43 -07:00
1 parent a8620e1c03
commit 51164d879d
1 file changed
+2 -2
+2 -2
View File
@@ -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;