me when forgor 💀
This commit is contained in:
parent
2bd64d4bda
commit
8b37f26fbb
4
index.js
4
index.js
|
@ -785,7 +785,8 @@ client.on("interactionCreate", async interaction => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start a word scramble
|
// Start a word scramble
|
||||||
gameData = wordScramble();
|
override = interaction.options.get("override").value;
|
||||||
|
gameData = wordScramble(override);
|
||||||
wordScrambles[interaction.channel.id] = {
|
wordScrambles[interaction.channel.id] = {
|
||||||
word: gameData.word,
|
word: gameData.word,
|
||||||
scrambledWord: gameData.scrambledWord,
|
scrambledWord: gameData.scrambledWord,
|
||||||
|
@ -885,7 +886,6 @@ client.on('messageCreate', async message => {
|
||||||
|
|
||||||
function wordScramble() {
|
function wordScramble() {
|
||||||
// Get a random word from config.games.wordscramble.words then scramble it
|
// Get a random word from config.games.wordscramble.words then scramble it
|
||||||
override = interaction.options.get("override").value;
|
|
||||||
if (!override) {
|
if (!override) {
|
||||||
word = config.games.wordscramble.words[Math.floor(Math.random() * config.games.wordscramble.words.length)];
|
word = config.games.wordscramble.words[Math.floor(Math.random() * config.games.wordscramble.words.length)];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue