fix incorrect option types, prepare casino setting
This commit is contained in:
6 files changed
+43
-10
No files matched your search
+34
-3
@@ -162,7 +162,7 @@ module.exports = {
|
||||
name: "amount",
|
||||
description: "The amount to set the starting balance",
|
||||
value: "amount",
|
||||
type: 5,
|
||||
type: 10,
|
||||
min_value: 0.01,
|
||||
required: true,
|
||||
}]
|
||||
@@ -190,7 +190,7 @@ module.exports = {
|
||||
name: "amount",
|
||||
description: "The amount to earn in 1 day of work",
|
||||
value: 120.00,
|
||||
type: 5,
|
||||
type: 10,
|
||||
min_value: 0.01,
|
||||
required: false,
|
||||
}
|
||||
@@ -332,6 +332,19 @@ module.exports = {
|
||||
required: true,
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: "casino_multiplier",
|
||||
description: "Change the multuplier for the amount to win back in casino games",
|
||||
value: "casino_win_multiplier",
|
||||
type: 1,
|
||||
options: [{
|
||||
name: "mutliplier",
|
||||
description: "Set the multiplier for winnings",
|
||||
value: 2,
|
||||
type: 10,
|
||||
min_value: 1,
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: "reset",
|
||||
description: "Restore all settings to default configurations",
|
||||
@@ -881,13 +894,31 @@ module.exports = {
|
||||
}
|
||||
});
|
||||
|
||||
const title = setting ? 'Only officers can use /search' : 'Any user can use /search';
|
||||
const title = setting ? 'True: Only officers can use /search' : 'False: Any user can use /search';
|
||||
|
||||
const successEmbed = new EmbedBuilder()
|
||||
.setColor(client.config.Colors.Green)
|
||||
.setTitle(title)
|
||||
|
||||
return interaction.send({ embeds: [successEmbed] });
|
||||
} else if (args[0].name == 'casino_multiplier') {
|
||||
client.dbo.collection("guilds").updateOne({"server.serverID":GuildDB.serverID}, {$set: {"server.casinoMultiplier": args[0].options[0]}}, function(err, res) {
|
||||
if (err) {
|
||||
client.error(err);
|
||||
const embed = new EmbedBuilder()
|
||||
.setDescription(`**Internal Error:**\nUh Oh D: Its not you, its me.\nThis command has crashed\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
|
||||
.setColor(client.config.Colors.Red);
|
||||
|
||||
return interaction.send({ embeds: [embed] });
|
||||
}
|
||||
});
|
||||
|
||||
const successEmbed = new EmbedBuilder()
|
||||
.setColor(client.config.Colors.Green)
|
||||
.setDescription(`**Success:** Set casino winnings multiplier to **${args[0].options[0]}x**`);
|
||||
|
||||
return interaction.send({ embeds: [successEmbed] });
|
||||
|
||||
} else if (args[0].name == 'reset') {
|
||||
const prompt = new EmbedBuilder()
|
||||
.setTitle(`Woah!? Hold on.`)
|
||||
|
||||
Reference in new issue
Block a user