feature/disbale emp+uav commands

This commit is contained in:
SowinskiBraeden committed 2023-10-21 21:23:36 -07:00
1 parent 3a29aaf316
commit 1d1698c8c4
6 files changed
+64 -8

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
const { EmbedBuilder, ActionRowBuilder, StringSelectMenuBuilder } = require('discord.js');
const { EmbedBuilder, ActionRowBuilder, StringSelectMenuBuilder, Embed } = require('discord.js');
const { createUser, addUser } = require('../database/user');
module.exports = {
@@ -21,9 +21,9 @@ module.exports = {
* @param {*} param3
*/
run: async (client, interaction, args, { GuildDB }) => {
if (client.exists(GuildDB.purchaseEMP) && !GuildDB.purchaseEMP) return interaction.send({ embeds: [new EmbedBuilder().setColor(client.config.Colors.Yellow).setDescription('**Notice:** The admins have disabled this feature')] });
let banking = await client.dbo.collection("users").findOne({"user.userID": interaction.member.user.id}).then(banking => banking);
if (!banking) {
banking = await createUser(interaction.member.user.id, GuildDB.serverID, GuildDB.startingBalance, client)