refactor/commands support migrates player stats
This commit is contained in:
17 files changed
+169
-284
No files matched your search
+2
-2
@@ -83,8 +83,8 @@ module.exports = {
|
||||
|
||||
if (args[0].name == 'player-track') {
|
||||
|
||||
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 gamertag \` ${args[0].options[0].value} \` cannot be found, the gamertag may be incorrect or this player has not logged onto the server before for at least \` 5 minutes \`.`)] });
|
||||
let playerStat = await client.dbo.collection("players").findOne({"gamertag": args[0].options[0].value});
|
||||
if (!client.exists(playerStat)) return interaction.send({ embeds: [new EmbedBuilder().setColor(client.config.Colors.Yellow).setDescription(`**Not Found** This gamertag \` ${args[0].options[0].value} \` cannot be found, the gamertag may be incorrect or this player has not logged onto the server before for at least \` 5 minutes \`.`)] });
|
||||
|
||||
let event = {
|
||||
type: args[0].name,
|
||||
|
||||
Reference in new issue
Block a user