7.1.0 configure emp price
This commit is contained in:
2 files changed
+27
-1
No files matched your search
@@ -233,6 +233,20 @@ module.exports = {
|
|||||||
required: true,
|
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",
|
name: "income_role",
|
||||||
description: "Add/update a role to earn income on /collect-income command",
|
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.' });
|
if (!canUseCommand) return interaction.send({ content: 'You don\'t have the permissions to use this command.' });
|
||||||
|
|
||||||
switch(args[0].name) {
|
switch(args[0].name) {
|
||||||
|
|
||||||
case 'allowed_channels':
|
case 'allowed_channels':
|
||||||
const channelid = args[0].options[0].options[0].value;
|
const channelid = args[0].options[0].options[0].value;
|
||||||
|
|
||||||
@@ -662,6 +677,17 @@ module.exports = {
|
|||||||
|
|
||||||
return interaction.send({ embeds: [successEmbed] });
|
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:
|
default:
|
||||||
return client.sendInternalError(interaction, 'There was an error parsing the config command');
|
return client.sendInternalError(interaction, 'There was an error parsing the config command');
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayz-armbands",
|
"name": "dayz-armbands",
|
||||||
"version": "7.0.3",
|
"version": "7.1.0",
|
||||||
"description": "A General Purpose Discord Bot for DayZ Servers.",
|
"description": "A General Purpose Discord Bot for DayZ Servers.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"nodemonConfig": {
|
"nodemonConfig": {
|
||||||
|
|||||||
Reference in new issue
Block a user