diff --git a/src/modules/misc/color.js b/src/modules/misc/color.js index 15fc7d3..057c7de 100644 --- a/src/modules/misc/color.js +++ b/src/modules/misc/color.js @@ -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);