randomtheme command cause why not
This commit is contained in:
parent
f09dd90f8f
commit
f98c76328a
1 changed files with 24 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue