diff --git a/changelog.json b/changelog.json index 6e25890a..5349d2d0 100644 --- a/changelog.json +++ b/changelog.json @@ -1,4 +1,5 @@ [ + "- Added more toggles to ?w", "- TODO: Changed /kv to parse out bad rags", "- Fixed Garden box rendering outside", "- Fixed blacklist auto kick", diff --git a/features/party/PartyCommands.js b/features/party/PartyCommands.js index 58e69856..e24decf8 100644 --- a/features/party/PartyCommands.js +++ b/features/party/PartyCommands.js @@ -18,6 +18,8 @@ let onCD = false; const RESPONSES = JSON.parse(FileLib.read("./VolcAddons/assets", "8ball.json")); const RPS = ["rock", "paper", "scissors"]; const QUOTES = JSON.parse(FileLib.read("./VolcAddons/assets", "quotes.json")); +const W = ["waifu", "neko", "shinobu", "megumin", "bully", "cuddle", "cry", "hug", "awoo", "kiss", "lick", "pat", "smug", "bonk", "yeet", "blush", "smile", "wave", "highfive", + "handhold", "nom", "bite", "glomp", "slap", "kill", "kick", "happy", "wink", "poke", "dance", "cringe"]; const IMGUR_KEYS = [ "d30c6dc9941b52b", "b2e8519cbb7712a", @@ -47,13 +49,18 @@ function upload(image) { }); }; +let waifu = ""; +let imgur = ""; /** * Makes a PULL request to get a random waifu image >.< + * + * @param {*} announce + * @param {*} category */ -let waifu = ""; -let imgur = ""; -function setWaifu(announce) { - axios.get("https://api.waifu.pics/sfw/waifu").then(link => { +function setWaifu(announce, category=toggles.womenCommand) { + if (category === 1) category = W[Math.floor(Math.random() * (W.length - 1))]; + else category = W[category - 2]; + axios.get(`https://api.waifu.pics/sfw/${category}`).then(link => { waifu = link.data.url; if (announce) new Message(`\n${LOGO + DARK_GREEN}Uploading `, @@ -183,7 +190,7 @@ export function executeCommand(name, args, sendTo) { case "waifu": case "women": case "w": - if (!toggles.womenCommand) return; + if (toggles.womenCommand === 0) return; if (sendTo !== false) ChatLib.command(`${sendTo} ${imgur} ${randID}-vaw`); // Randomize end to avoid duplicate message ^ @@ -231,6 +238,15 @@ export function executeCommand(name, args, sendTo) { if (getIsLeader() && settings.leaderCommands) delay(() => ChatLib.command(`${sendTo} Leader Commands: ? ${randID}`), 690); break; + default: + // Check for unique ?w commands + const wIndex = W.indexOf(command) + if (toggles.womenCommand === 0 || wIndex === -1) return; + + if (sendTo !== false) ChatLib.command(`${sendTo} ${imgur} ${randID}-vaw`); + // Randomize end to avoid duplicate message ^ + setWaifu(true, wIndex + 2); + break; } }, 690); // LEADER COMMANDS diff --git a/index.js b/index.js index 83e41a72..c926204b 100644 --- a/index.js +++ b/index.js @@ -405,10 +405,12 @@ register ("command", (...args) => { default: args = args.map(w => w.toLowerCase()); // Other args to check - const PARTY_COMMANDS = new Set( - ["cringe", "gay", "racist", "femboy", "trans", "transphobic", "dice", "roll", "coin", "flip", "coinflip", - "cf", "8ball", "rps", "waifu", "w", "women"] - ); + const PARTY_COMMANDS = new Set([ + "cringe", "gay", "racist", "femboy", "trans", "transphobic", "dice", "roll", "coin", "flip", "coinflip", + "cf", "8ball", "rps", "waifu", "w", "women", "neko", "shinobu", "megumin", "bully", "cuddle", "cry", "hug", + "awoo", "kiss", "lick", "pat", "smug", "bonk", "yeet", "blush", "smile", "wave", "highfive", "handhold", "nom", + "bite", "glomp", "slap", "kill", "kick", "happy", "wink", "poke", "dance", "cringe" + ]); const INSTANCES = new Set(["f", "m", "t"]); const STATUS_ARGS = new Set(["ping", "tps", "fps", "cps", "yaw", "pitch", "dir", "direction"]); const STAT_ARGS = new Set(["pet", "stats", "soulflow", "sf", "playtime", "pt", "legion"]); diff --git a/utils/toggles.js b/utils/toggles.js index d2eb40a8..9141a4dc 100644 --- a/utils/toggles.js +++ b/utils/toggles.js @@ -3,7 +3,8 @@ import { @Vigilant, @TextProperty, @CheckboxProperty, - @SliderProperty + @SliderProperty, + @SelectorProperty } from "../../Vigilance/index"; @Vigilant("VolcAddons/data", "VolcAddons' Toggles", { @@ -268,13 +269,15 @@ class Settings { description: "Hey, now You're an all-star" }) statusCommand = true; - @CheckboxProperty({ - name: `Women Command ${DARK_AQUA}?`, + @SelectorProperty({ + name: `Gyatt Command ${DARK_AQUA}?`, category: "Party Commands", subcategory: "Party Commands", - description: "Get your game on, go play" + description: "The most important command deserves the only description. This will only control '?w', you can access any of the other commands by using '?'. Note that it will only send on next command for speed purposes :)", + options: ["OFF", "random", "waifu", "neko", "shinobu", "megumin", "bully", "cuddle", "cry", "hug", "awoo", "kiss", "lick", "pat", "smug", "bonk", "yeet", "blush", + "smile", "wave", "highfive", "handhold", "nom", "bite", "glomp", "slap", "kill", "kick", "happy", "wink", "poke", "dance", "cringe"] }) - womenCommand = true; + womenCommand = 0; // --- KUUDRA ALERTS ---