7.1.0 configure emp price

This commit is contained in:
SowinskiBraeden committed 2023-06-13 14:08:52 -07:00
1 parent 6cbd545232
commit 83a8d302cb
2 files changed
+27 -1

No files matched your search

+26
View File
@@ -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');
}
+1 -1
View File
@@ -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": {