Skip to content

Commit

Permalink
added more ?w toggles
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenga8533 committed Feb 23, 2024
1 parent a6a1f81 commit 7a027a2
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 14 deletions.
1 change: 1 addition & 0 deletions changelog.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
26 changes: 21 additions & 5 deletions features/party/PartyCommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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 `,
Expand Down Expand Up @@ -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 ^
Expand Down Expand Up @@ -231,6 +238,15 @@ export function executeCommand(name, args, sendTo) {
if (getIsLeader() && settings.leaderCommands)
delay(() => ChatLib.command(`${sendTo} Leader Commands: ?<warp, transfer, promote, demote, allinv, stream> ${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
Expand Down
10 changes: 6 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]);
Expand Down
13 changes: 8 additions & 5 deletions utils/toggles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import {
@Vigilant,
@TextProperty,
@CheckboxProperty,
@SliderProperty
@SliderProperty,
@SelectorProperty
} from "../../Vigilance/index";

@Vigilant("VolcAddons/data", "VolcAddons' Toggles", {
Expand Down Expand Up @@ -268,13 +269,15 @@ class Settings {
description: "Hey, now You're an all-star"
})
statusCommand = true;
@CheckboxProperty({
name: `Women Command ${DARK_AQUA}?<w, waifu, women>`,
@SelectorProperty({
name: `Gyatt Command ${DARK_AQUA}?<w, waifu, women>`,
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 '?<toggle>'. 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 ---

Expand Down

0 comments on commit 7a027a2

Please sign in to comment.