From b995899870d7fa1a651805573c069902e0d9c505 Mon Sep 17 00:00:00 2001 From: ethanf Date: Sun, 28 Jan 2024 17:38:01 -0600 Subject: [PATCH] feat: fun and passion are modifiable --- index.js | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 4ffc907..2c71a6e 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ import fs from "fs"; -import path from "path"; +import path, { parse } from "path"; import { Client, GatewayIntentBits, Partials } from "discord.js"; const { TOKEN, @@ -735,6 +735,34 @@ client.on("messageCreate", async (message) => { } } + if (args[0] === "fun") { + if ( + args.length < 2 || + isNaN(args[1]) || + parseInt(args[1]) < 1 || + parseInt(args[1]) > 10 + ) + return await message.reply( + `Current FUN value: ${funInput}\nUsage: \`fun <1-10>\`` + ); + funInput = parseInt(args[1]); + return await message.reply(`FUN value set to ${funInput}`); + } + + if (args[0] === "passion") { + if ( + args.length < 2 || + isNaN(args[1]) || + parseInt(args[1]) < 1 || + parseInt(args[1]) > 5 + ) + return await message.reply( + `Current PASSION: ${passionInput}\nUsage: \`passion <1-5>\`` + ); + passionInput = parseInt(args[1]); + return await message.reply(`PASSION set to ${passionInput}`); + } + if (args[0] === "simulateteams") { await message.reply("Simulating teams...");