diff --git a/commands/config.js b/commands/config.js index 7fc22d8..5c2d245 100644 --- a/commands/config.js +++ b/commands/config.js @@ -233,6 +233,20 @@ module.exports = { required: true, }] }, + { + name: "emp-price", + description: "Configure the price of an EMP", + value: "emp-price", + type: 1, + options: [{ + name: "amount", + description: "The amount to set the EMP price", + value: "amount", + type: 10, + min_value: 0.01, + required: true, + }] + }, { name: "income_role", description: "Add/update a role to earn income on /collect-income command", @@ -308,6 +322,7 @@ module.exports = { if (!canUseCommand) return interaction.send({ content: 'You don\'t have the permissions to use this command.' }); switch(args[0].name) { + case 'allowed_channels': const channelid = args[0].options[0].options[0].value; @@ -662,6 +677,17 @@ module.exports = { return interaction.send({ embeds: [successEmbed] }); + case 'emp-price': + client.dbo.collection("guilds").updateOne({"server.serverID": GuildDB.serverID}, {$set: {"server.empPrice":args[0].options[0].value}}, function(err, res) { + if (err) return client.sendInternalError(interaction, err); + }); + + let successEmbed = new EmbedBuilder() + .setColor(client.config.Colors.Green) + .setDescription(`Successfully set $${args[0].options[0].value.toFixed(2)} as EMP price`); + + return interaction.send({ embeds: [successEmbed] }); + default: return client.sendInternalError(interaction, 'There was an error parsing the config command'); } diff --git a/package.json b/package.json index 3b4139c..6310fed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dayz-armbands", - "version": "7.0.3", + "version": "7.1.0", "description": "A General Purpose Discord Bot for DayZ Servers.", "main": "index.js", "nodemonConfig": {