mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-03 23:36:35 +02:00
add devs commande
This commit is contained in:
@@ -7,7 +7,6 @@ module.exports = {
|
|||||||
category: 'botcontrol',
|
category: 'botcontrol',
|
||||||
|
|
||||||
async execute(message, args, client) {
|
async execute(message, args, client) {
|
||||||
// Vérifiez si l'utilisateur a fourni suffisamment d'arguments
|
|
||||||
if (args.length < 2) {
|
if (args.length < 2) {
|
||||||
return message.reply('Veuillez fournir un paramètre parmis `name` ou `pic` pour sa valeur.');
|
return message.reply('Veuillez fournir un paramètre parmis `name` ou `pic` pour sa valeur.');
|
||||||
}
|
}
|
||||||
@@ -16,11 +15,9 @@ module.exports = {
|
|||||||
|
|
||||||
if (setting === 'name') {
|
if (setting === 'name') {
|
||||||
const value = args.slice(1).join(' ');
|
const value = args.slice(1).join(' ');
|
||||||
// Changer le pseudo du bot sur le serveur
|
|
||||||
if (value) {
|
if (value) {
|
||||||
try {
|
try {
|
||||||
const botMember = await message.guild.members.fetch(client.user.id);
|
const botMember = await message.guild.members.fetch(client.user.id);
|
||||||
// Set the nickname for the bot member
|
|
||||||
await botMember.setNickname(value);
|
await botMember.setNickname(value);
|
||||||
return message.reply(`Mon nouveau pseudo est maintenant **${value}**.`);
|
return message.reply(`Mon nouveau pseudo est maintenant **${value}**.`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -32,7 +29,6 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
} else if (setting === 'pic') {
|
} else if (setting === 'pic') {
|
||||||
const value = args[1];
|
const value = args[1];
|
||||||
// Changer l'avatar du bot
|
|
||||||
if (value && value.startsWith('http')) {
|
if (value && value.startsWith('http')) {
|
||||||
try {
|
try {
|
||||||
await client.user.setAvatar(value);
|
await client.user.setAvatar(value);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ const GestionDb = new db.table("gestion");
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'blrank',
|
name: 'blrank',
|
||||||
description: 'Affiché ou gérés la blrankn',
|
description: 'Affiché ou gérés la blrankn',
|
||||||
emote: '👑',
|
emote: '🚫',
|
||||||
utilisation: 'blrank [@user]',
|
utilisation: 'blrank [@user]',
|
||||||
category: 'gestion',
|
category: 'gestion',
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
const { EmbedBuilder, StringSelectMenuBuilder, ActionRowBuilder } = require("discord.js")
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'devs',
|
||||||
|
aliases: ['devs'],
|
||||||
|
description: 'Avoir les inforamtion sur les developeur.',
|
||||||
|
emote: '⚙️',
|
||||||
|
utilisation: 'devs',
|
||||||
|
category: 'utils',
|
||||||
|
async execute(message, args, client) {
|
||||||
|
const user = await client.users.fetch("1003985920162287696");
|
||||||
|
const embed = new EmbedBuilder()
|
||||||
|
.setTitle(`Informations sur le développeur ${user.username}`)
|
||||||
|
.setAuthor({ name: user.username, iconURL: user.displayAvatarURL({ dynamic: true })})
|
||||||
|
.setThumbnail(user.displayAvatarURL({ dynamic: true }))
|
||||||
|
.addFields(
|
||||||
|
{ name: "**Nom d'affichage**", value:user.displayName},
|
||||||
|
{ name: '**ID**', value: user.id},
|
||||||
|
{ name: '**Crée le**', value: `<t:${Math.floor(user.createdAt.getTime() / 1000)}:F>` },
|
||||||
|
)
|
||||||
|
.setColor('#0099ff');
|
||||||
|
|
||||||
|
const selectMenu = new StringSelectMenuBuilder()
|
||||||
|
.setCustomId('dev_select')
|
||||||
|
.setPlaceholder('Sélectionnez un développeur')
|
||||||
|
.addOptions([
|
||||||
|
{
|
||||||
|
label: 'Valou336',
|
||||||
|
description: 'Cliquez pour voir les informations',
|
||||||
|
value: 'devs_1003985920162287696',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Tuturp33',
|
||||||
|
description: 'Cliquez pour voir les informations',
|
||||||
|
value: 'devs_671763971803447298',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const row = new ActionRowBuilder()
|
||||||
|
.addComponents(selectMenu);
|
||||||
|
|
||||||
|
const sendMessage = await message.reply({ embeds: [embed], components: [row] });
|
||||||
|
|
||||||
|
const filter = i => i.customId === 'dev_select' && i.user.id === message.author.id;
|
||||||
|
const collector = sendMessage.createMessageComponentCollector({ filter, time: 60000 });
|
||||||
|
|
||||||
|
|
||||||
|
collector.on('collect', async i => {
|
||||||
|
const userId = i.values[0].split('_')[1];
|
||||||
|
const user = await client.users.fetch(userId);
|
||||||
|
|
||||||
|
const embed2 = new EmbedBuilder()
|
||||||
|
.setTitle(`Informations sur le développeur ${user.username}`)
|
||||||
|
.setAuthor({ name: user.username, iconURL: user.displayAvatarURL({ dynamic: true })})
|
||||||
|
.setThumbnail(user.displayAvatarURL({ dynamic: true }))
|
||||||
|
.addFields(
|
||||||
|
{ name: "**Nom d'affichage**", value:user.displayName},
|
||||||
|
{ name: '**ID**', value: user.id},
|
||||||
|
{ name: '**Crée le**', value: `<t:${Math.floor(user.createdAt.getTime() / 1000)}:F>` },
|
||||||
|
)
|
||||||
|
.setTimestamp()
|
||||||
|
.setFooter({ text: client.user.usrname })
|
||||||
|
.setColor('#0099ff');
|
||||||
|
|
||||||
|
|
||||||
|
await i.update({ embeds: [embed2], components: [row] });
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
Reference in New Issue
Block a user