mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-24 14:17:39 +02:00
Merge branch 'main' of https://github.com/Tutur33/gestion
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
const { EmbedBuilder, ButtonStyle, ButtonBuilder, ActionRowBuilder } = require("discord.js")
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'addbtnurl',
|
||||||
|
description: 'Ajoute un bouton url',
|
||||||
|
emote: '🔗',
|
||||||
|
utilisation: 'addbtnurl [url] [message ID] [label]',
|
||||||
|
category: 'utils',
|
||||||
|
|
||||||
|
async execute(message, args, client) {
|
||||||
|
if (!args[0]) return message.reply('Veuillez fournir une url');
|
||||||
|
if (!args[1]) return message.reply('Veuillez fournir un ID de message');
|
||||||
|
if (!args[2]) return message.reply('Veuillez fournir un label');
|
||||||
|
const url = args[0];
|
||||||
|
const messageId = args[1];
|
||||||
|
const label = args.slice(2).join(' ');
|
||||||
|
|
||||||
|
const button = new ButtonBuilder()
|
||||||
|
.setLabel(label)
|
||||||
|
.setURL(url)
|
||||||
|
.setStyle(ButtonStyle.Link);
|
||||||
|
|
||||||
|
const row = new ActionRowBuilder()
|
||||||
|
.addComponents(button);
|
||||||
|
|
||||||
|
const msg = await message.channel.messages.fetch(messageId);
|
||||||
|
if (!msg) return message.reply('Message introuvable');
|
||||||
|
if (msg.author.id !== client.user.id) return message.reply('Ce message n\'a pas été envoyé par moi');
|
||||||
|
msg.edit({ components: [row] });
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -27,7 +27,9 @@ module.exports = {
|
|||||||
.addFields(
|
.addFields(
|
||||||
{ name: 'Utilisation', value: `\`${prefix}${command.utilisation ? `${command.utilisation}` : ''}\``, inline: true },
|
{ name: 'Utilisation', value: `\`${prefix}${command.utilisation ? `${command.utilisation}` : ''}\``, inline: true },
|
||||||
{ name: 'Catégorie', value: command.category || 'Non spécifiée', inline: true }
|
{ name: 'Catégorie', value: command.category || 'Non spécifiée', inline: true }
|
||||||
);
|
)
|
||||||
|
.setTimestamp()
|
||||||
|
.setFooter({text: `${client.user.tag} © 2024`, iconURL: client.user.displayAvatarURL({dynamic: true})})
|
||||||
|
|
||||||
return message.reply({ embeds: [embed_command] });
|
return message.reply({ embeds: [embed_command] });
|
||||||
}
|
}
|
||||||
@@ -41,7 +43,6 @@ module.exports = {
|
|||||||
game: [],
|
game: [],
|
||||||
gestion: [],
|
gestion: [],
|
||||||
utils: [],
|
utils: [],
|
||||||
other: [],
|
|
||||||
};
|
};
|
||||||
for (const command of client.commands.values()) {
|
for (const command of client.commands.values()) {
|
||||||
if (command.category) {
|
if (command.category) {
|
||||||
@@ -63,6 +64,8 @@ module.exports = {
|
|||||||
.setTitle('📚 Information')
|
.setTitle('📚 Information')
|
||||||
.setDescription(description)
|
.setDescription(description)
|
||||||
.setThumbnail(message.guild.iconURL())
|
.setThumbnail(message.guild.iconURL())
|
||||||
|
.setTimestamp()
|
||||||
|
.setFooter({text: `${client.user.tag} © 2024`, iconURL: client.user.displayAvatarURL({dynamic: true})})
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const [category, commands] of Object.entries(categories)) {
|
for (const [category, commands] of Object.entries(categories)) {
|
||||||
@@ -76,7 +79,9 @@ module.exports = {
|
|||||||
embeds[category] = new EmbedBuilder()
|
embeds[category] = new EmbedBuilder()
|
||||||
.setColor('#0099ff')
|
.setColor('#0099ff')
|
||||||
.setTitle(`Catégorie ${category}`)
|
.setTitle(`Catégorie ${category}`)
|
||||||
.setDescription(description);
|
.setDescription(description)
|
||||||
|
.setTimestamp()
|
||||||
|
.setFooter({text: `${client.user.tag} © 2024`, iconURL: client.user.displayAvatarURL({dynamic: true})})
|
||||||
}
|
}
|
||||||
|
|
||||||
const menu = new StringSelectMenuBuilder()
|
const menu = new StringSelectMenuBuilder()
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ module.exports = {
|
|||||||
const embed = new EmbedBuilder()
|
const embed = new EmbedBuilder()
|
||||||
.setTitle(`Avatar de ${user.tag}`)
|
.setTitle(`Avatar de ${user.tag}`)
|
||||||
.setImage(avatar)
|
.setImage(avatar)
|
||||||
|
.setTimestamp()
|
||||||
|
.setFooter({text: `${client.user.tag} © 2024`, iconURL: client.user.displayAvatarURL({dynamic: true})});
|
||||||
|
|
||||||
|
|
||||||
message.reply({
|
message.reply({
|
||||||
embeds: [embed],
|
embeds: [embed],
|
||||||
components: [row]
|
components: [row]
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
const { EmbedBuilder, ButtonStyle, ButtonBuilder, ActionRowBuilder } = require("discord.js")
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'servericon',
|
||||||
|
description: 'Affiche l\'icone du serveur',
|
||||||
|
emote: '🖼️',
|
||||||
|
utilisation: 'servericon',
|
||||||
|
category: 'utils',
|
||||||
|
|
||||||
|
async execute(message, args, client) {
|
||||||
|
let serverIcon = message.guild.iconURL( { dynamic: true, size: 4096 } );
|
||||||
|
if (!serverIcon) return message.reply("Ce serveur n'a pas d'icone");
|
||||||
|
|
||||||
|
const button = new ButtonBuilder()
|
||||||
|
.setLabel('Icon url')
|
||||||
|
.setURL(serverIcon)
|
||||||
|
.setStyle(ButtonStyle.Link);
|
||||||
|
|
||||||
|
const row = new ActionRowBuilder()
|
||||||
|
.addComponents(button);
|
||||||
|
|
||||||
|
const embed = new EmbedBuilder()
|
||||||
|
.setColor("#FFFFFF")
|
||||||
|
.setTitle(`🖼️ Icon du serveur \`${message.guild.name}\``)
|
||||||
|
.setImage(serverIcon)
|
||||||
|
.setTimestamp()
|
||||||
|
.setFooter({text: `${client.user.tag} © 2024`, iconURL: client.user.displayAvatarURL({dynamic: true})});
|
||||||
|
|
||||||
|
message.reply({ embeds: [embed], components: [row]});
|
||||||
|
},
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user