me when forgor 💀

This commit is contained in:
Darien Rousseau 2023-09-04 15:39:50 -06:00 committed by GitHub
parent 2bd64d4bda
commit 8b37f26fbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -785,7 +785,8 @@ client.on("interactionCreate", async interaction => {
}
// Start a word scramble
gameData = wordScramble();
override = interaction.options.get("override").value;
gameData = wordScramble(override);
wordScrambles[interaction.channel.id] = {
word: gameData.word,
scrambledWord: gameData.scrambledWord,
@ -885,7 +886,6 @@ client.on('messageCreate', async message => {
function wordScramble() {
// Get a random word from config.games.wordscramble.words then scramble it
override = interaction.options.get("override").value;
if (!override) {
word = config.games.wordscramble.words[Math.floor(Math.random() * config.games.wordscramble.words.length)];
}