2023-10-13 15:04:11 +02:00
|
|
|
import { SlashCommandBuilder } from "discord.js";
|
|
|
|
import Inspiration from "./graphismecommands/inspiration.mjs";
|
|
|
|
import Palette from "./graphismecommands/palette.mjs";
|
|
|
|
import Remix from "./graphismecommands/remix.mjs";
|
|
|
|
import Blend from "./graphismecommands/colorblend.mjs";
|
2023-09-13 21:12:45 +02:00
|
|
|
|
|
|
|
export default {
|
2023-09-09 22:06:44 +02:00
|
|
|
data: new SlashCommandBuilder()
|
2023-10-13 15:04:11 +02:00
|
|
|
.setName("graphisme")
|
|
|
|
.setDescription("Diverse commandes pour le graphisme.")
|
|
|
|
.addSubcommand((subcommand) =>
|
|
|
|
subcommand
|
|
|
|
.setName("inspiration")
|
|
|
|
.setDescription(
|
|
|
|
"Une citation, suggestion de couleur ou proposition de méthode.",
|
|
|
|
),
|
2023-09-09 22:06:44 +02:00
|
|
|
)
|
2023-10-13 15:04:11 +02:00
|
|
|
.addSubcommand((subcommand) =>
|
|
|
|
subcommand
|
|
|
|
.setName("palette")
|
|
|
|
.setDescription(
|
|
|
|
"Une palette harmonieuse générée aléatoirement.",
|
|
|
|
),
|
2023-09-09 22:44:33 +02:00
|
|
|
)
|
2023-10-13 15:04:11 +02:00
|
|
|
.addSubcommand((subcommand) =>
|
|
|
|
subcommand
|
|
|
|
.setName("remix")
|
|
|
|
.setDescription(
|
|
|
|
"Renvoie l'image insérée avec un filtre appliqué.",
|
|
|
|
)
|
|
|
|
.addAttachmentOption((option) =>
|
|
|
|
option
|
|
|
|
.setName("image")
|
|
|
|
.setDescription("Image à modifier")
|
|
|
|
.setRequired(true),
|
|
|
|
)
|
|
|
|
.addStringOption((option) =>
|
|
|
|
option
|
|
|
|
.setName("filter")
|
|
|
|
.setDescription("Le filtre appliqué")
|
|
|
|
.setRequired(true)
|
|
|
|
.addChoices(
|
|
|
|
{ name: "Invert", value: "invert" },
|
|
|
|
{ name: "Nuance de gris", value: "grayscale" },
|
|
|
|
{ name: "Sepia", value: "sepia" },
|
|
|
|
{ name: "Flou", value: "blur" },
|
|
|
|
{ name: "Pixelisé", value: "pixelate" },
|
|
|
|
{ name: "Miroir", value: "mirror" },
|
|
|
|
{ name: "Rotation", value: "rotate" },
|
|
|
|
{ name: "Luminosité", value: "brightness" },
|
|
|
|
{ name: "Vintage", value: "vintage" },
|
|
|
|
{ name: "Peinture à l'huile", value: "oilpaint" },
|
|
|
|
{ name: "Aquarelle", value: "watercolor" },
|
|
|
|
{ name: "Néon", value: "neon" },
|
|
|
|
),
|
|
|
|
),
|
2023-09-10 09:02:17 +02:00
|
|
|
)
|
2023-10-13 15:04:11 +02:00
|
|
|
.addSubcommand((subcommand) =>
|
|
|
|
subcommand
|
|
|
|
.setName("blend")
|
|
|
|
.setDescription(
|
|
|
|
"Combine deux couleurs pour en créer une troisième.",
|
|
|
|
)
|
|
|
|
.addStringOption((option) =>
|
|
|
|
option
|
|
|
|
.setName("color1")
|
|
|
|
.setDescription("La première couleur")
|
|
|
|
.setRequired(true),
|
|
|
|
)
|
|
|
|
.addStringOption((option) =>
|
|
|
|
option
|
|
|
|
.setName("color2")
|
|
|
|
.setDescription("La deuxième couleur")
|
|
|
|
.setRequired(true),
|
|
|
|
)
|
|
|
|
.addStringOption((option) =>
|
|
|
|
option
|
|
|
|
.setName("mode")
|
|
|
|
.setDescription("Le mode de fusion")
|
|
|
|
.setRequired(true)
|
|
|
|
.addChoices(
|
|
|
|
{ name: "Normal", value: "normal" },
|
|
|
|
{ name: "Multiplication", value: "multiply" },
|
|
|
|
{ name: "Écran", value: "screen" },
|
|
|
|
{ name: "Overlay", value: "overlay" },
|
|
|
|
),
|
|
|
|
),
|
2023-09-09 22:06:44 +02:00
|
|
|
),
|
|
|
|
async execute(interaction) {
|
|
|
|
switch (interaction.options.getSubcommand()) {
|
2023-10-13 15:04:11 +02:00
|
|
|
case "inspiration":
|
2023-09-09 22:06:44 +02:00
|
|
|
Inspiration.execute(interaction);
|
|
|
|
break;
|
2023-10-13 15:04:11 +02:00
|
|
|
case "palette":
|
2023-09-09 22:06:44 +02:00
|
|
|
Palette.execute(interaction);
|
|
|
|
break;
|
2023-10-13 15:04:11 +02:00
|
|
|
case "remix":
|
2023-09-09 22:44:33 +02:00
|
|
|
Remix.execute(interaction);
|
|
|
|
break;
|
2023-10-13 15:04:11 +02:00
|
|
|
case "blend":
|
2023-09-10 09:02:17 +02:00
|
|
|
Blend.execute(interaction);
|
|
|
|
break;
|
2023-10-13 15:04:11 +02:00
|
|
|
}
|
2023-09-30 08:29:50 +02:00
|
|
|
},
|
2023-10-02 18:19:40 +02:00
|
|
|
};
|