randomtheme command cause why not

This commit is contained in:
Cynthia Foxwell 2025-09-18 18:14:57 -06:00
parent f09dd90f8f
commit f98c76328a
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -169,3 +169,27 @@ colorInteraction.callback = async function (interaction) {
return color.callback(interaction, input, [input], {truerandom, first});
};
hf.registerCommand(colorInteraction);
const randomtheme = new Command("randomtheme");
randomtheme.category = "misc";
randomtheme.helpText = "Create a random Discord theme";
randomtheme.callback = async function (msg, line, args, {truerandom}) {
const colors = [];
for (let _ = 0; _ < Math.floor(Math.random() * 5) + 1; _++) {
colors.push(truerandom ? tinycolor(Math.floor(Math.random() * 0xffffff)) : randomColor());
}
const angle = Math.floor(Math.random() * 361);
const mix = Math.floor(Math.random() * 101);
return {
shared_client_theme: {
base_mix: mix,
base_theme: 1,
colors,
gradient_angle: angle,
},
};
};
hf.registerCommand(randomtheme);