purchase uav

This commit is contained in:
SowinskiBraeden committed 2023-04-16 12:52:04 -07:00
1 parent d111a4be94
commit 418b199ea3
10 files changed
+198 -43

No files matched your search

+24
View File
@@ -219,6 +219,20 @@ module.exports = {
required: true,
}]
},
{
name: "uav-price",
description: "Configure the price of a UAV",
value: "uav-price",
type: 1,
options: [{
name: "amount",
description: "The amount to set the UAV 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",
@@ -613,6 +627,16 @@ module.exports = {
return interaction.send({ embeds: [prompt], components: [opt], flags: (1 << 6) });
}
}
} else if (args[0].name == 'uav-price') {
client.dbo.collection("guilds").updateOne({"server.serverID": GuildDB.serverID}, {$set: {"server.uavPrice":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 UAV price`);
return interaction.send({ embeds: [successEmbed] });
}
},
},