diff --git a/commands.json b/commands.json index 13093f7..d183f80 100644 --- a/commands.json +++ b/commands.json @@ -127,9 +127,9 @@ "options":[ { "name": "rig", - "description": "DEBUG: Rig the slots to specific values", + "description": "Willing to put some lucky number/word? This option is for you!", "type": 3, - "required": true + "required": false } ] }, @@ -233,6 +233,12 @@ "description": "Force the specified string/word instead of the random option", "type": 3, "required": false + }, + { + "name": "amount", + "description": "The amount to pay for this forced scramble", + "type": 10, + "required": false } ] } diff --git a/index.js b/index.js index 6b35bba..75b8d6e 100644 --- a/index.js +++ b/index.js @@ -784,16 +784,23 @@ client.on("interactionCreate", async interaction => { }); } - // Start a word scramble + // Start a word scramble and check if we specified a word if (interaction.options.get("override")) { override = interaction.options.get("override").value; } else { override = false; + } ${wordScrambles.amount} + if (interaction.options.get("amount")) { + amount = interaction.options.getNumber("amount"); + } + else { + amount = 2; } gameData = wordScramble(override); wordScrambles[interaction.channel.id] = { word: gameData.word, + amount: amount, scrambledWord: gameData.scrambledWord, badGuesses: [] } @@ -836,12 +843,12 @@ client.on('messageCreate', async message => { // Check if the message is the correct answer if (message.content.toLowerCase() == wordScrambles[message.channel.id].word.toLowerCase()) { // Give the user a point - await checkAndModifyPoints(message.author, 2); + await checkAndModifyPoints(message.author, ${wordScrambles[message.channel.id].amount}); // Send the message message.channel.send({ embeds: [{ title: "Word Scramble", - description: `**${message.author}** got the word **${wordScrambles[message.channel.id].word}**!\nYou got 2 coins!`, + description: `**${message.author}** got the word **${wordScrambles[message.channel.id].word}**!\nYou got ${wordScrambles[message.channel.id].amount} coins!`, color: 0x00ff00 }] });