2023-09-09 22:06:44 +02:00
|
|
|
const { SlashCommandBuilder } = require('discord.js');
|
|
|
|
const Inspiration = require('./graphismecommands/inspiration.js');
|
2023-09-09 22:44:33 +02:00
|
|
|
const Palette = require('./graphismecommands/palette.js');
|
|
|
|
const Remix = require('./graphismecommands/remix.js');
|
2023-09-10 09:02:17 +02:00
|
|
|
const Blend = require('./graphismecommands/colorblend.js');
|
2023-09-09 22:06:44 +02:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
data: new SlashCommandBuilder()
|
|
|
|
.setName('graphisme')
|
|
|
|
.setDescription('Diverse commandes pour le graphisme.')
|
|
|
|
.addSubcommand(
|
|
|
|
subcommand =>
|
|
|
|
subcommand
|
|
|
|
.setName('inspiration')
|
|
|
|
.setDescription('Une citation, suggestion de couleur ou proposition de méthode.')
|
|
|
|
)
|
|
|
|
.addSubcommand(
|
|
|
|
subcommand =>
|
|
|
|
subcommand
|
|
|
|
.setName('palette')
|
|
|
|
.setDescription('Une palette harmonieuse générée aléatoirement.')
|
2023-09-09 22:44:33 +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' },
|
2023-09-10 08:38:43 +02:00
|
|
|
{ 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-09 22:44:33 +02:00
|
|
|
))
|
2023-09-10 09:02:17 +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()) {
|
|
|
|
case 'inspiration':
|
|
|
|
Inspiration.execute(interaction);
|
|
|
|
break;
|
|
|
|
case 'palette':
|
|
|
|
Palette.execute(interaction);
|
|
|
|
break;
|
2023-09-09 22:44:33 +02:00
|
|
|
case 'remix':
|
|
|
|
Remix.execute(interaction);
|
|
|
|
break;
|
2023-09-10 09:02:17 +02:00
|
|
|
case 'blend':
|
|
|
|
Blend.execute(interaction);
|
|
|
|
break;
|
2023-09-09 22:06:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|