Skip to content

Commit

Permalink
✏Modifcation du help
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldb09 authored Feb 28, 2021
1 parent bdd4d7c commit 6937a45
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions commands/utilities/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,29 @@ module.exports = {
let prefixget = await guild.findOne({ serverID: message.guild.id, reason: `prefix` })
const prefix = prefixget.content;
if (!args.length) {

let Title = await message.translate(`Commande d'aide`)
let Description = await message.translate(`● Bonjour , je suis ${message.client.user.tag} et mon préfixe est \`${prefix}\`
● Pour de l'aide sur une commande : \`${prefix}help <commande>\`
● Pour me configurer , allez sur mon [Dashboard](http://green-bot.tk/)`)
const exampleEmbed = new Discord.MessageEmbed()
.setColor(message.client.color || '#3A871F')

.setAuthor(`${message.client.user.username} - Commande d'aide`, message.client.user.displayAvatarURL())
.setDescription(`● Bonjour , je suis ${message.client.user.tag} et mon préfixe est \`${prefix}\`
● Pour de l'aide sur une commande : \`${prefix}help <commande>\`
● Pour me configurer , allez sur mon [Dashboard](http://green-bot.tk/) `)
.setAuthor(`${message.client.user.username} - ${Title}`, message.client.user.displayAvatarURL())
.setDescription(Description)
.addFields({ name: `${emoji.music} | Musique (${commands.filter(command => command.cat === "musique").size}) `, value: commands.filter(command => command.cat === "musique").map(command => `\`${command.name}\``).join(', ') })
.addFields({ name: `${emoji.level} | Système de Niveau (${commands.filter(command => command.cat === "level").size}) `, value: commands.filter(command => command.cat === "level").map(command => `\`${command.name}\``).join(', ') })
.addFields({ name: `${emoji.rpg} | Economy (${commands.filter(command => command.cat === "rpg").size}) `, value: commands.filter(command => command.cat === "rpg").map(command => `\`${command.name}\``).join(', ') })

.addFields({ name: `${emoji.picture} | Images (${commands.filter(command => command.cat === "pictures").size}) `, value: commands.filter(command => command.cat === "pictures").map(command => `\`${command.name}\``).join(', ') })
.addFields({ name: `${emoji.fun} | Fun (${commands.filter(command => command.cat === "fun").size})`, value: commands.filter(command => command.cat === "fun").map(command => `\`${command.name}\``).join(', ') })
.addFields({ name: `${emoji.util} | Utilitaires (${commands.filter(command => command.cat === "utilities").size}) `, value: commands.filter(command => command.cat === "utilities").map(command => `\`${command.name}\``).join(', ') })
.addFields({ name: `${emoji.moderator} | Modération (${commands.filter(command => command.cat === "moderation").size}) `, value: commands.filter(command => command.cat === "moderation").map(command => `\`${command.name}\``).join(', ') })
.addFields({ name: `${emoji.configuration} | Configuration (${commands.filter(command => command.cat === "configuration").size}) `, value: commands.filter(command => command.cat === "configuration").map(command => `\`${command.name}\``).join(', ') })
.addFields({ name: `${emoji.role} | Roles à réaction (${commands.filter(command => command.cat === "rr").size}) `, value: commands.filter(command => command.cat === "rr").map(command => `\`${command.name}\``).join(', ') })

.addFields({ name: `🎁 | Giveaway (${commands.filter(command => command.cat === "gway").size}) `, value: commands.filter(command => command.cat === "gway").map(command => `\`${command.name}\``).join(', ') })
.addFields({ name: `${emoji.fun} | Fun (${commands.filter(command => command.cat === "fun").size})`, value: commands.filter(command => command.cat === "fun").map(command => `\`${command.name}\``).join(', ') })
.addFields({ name: `${emoji.picture} | Images (${commands.filter(command => command.cat === "pictures").size})`, value: commands.filter(command => command.cat === "pictures").map(command => `\`${command.name}\``).join(', ') })

.addFields({ name: `${emoji.owner} | Owner (${commands.filter(command => command.cat === "owner").size})`, value: commands.filter(command => command.cat === "owner").map(command => `\`${command.name}\``).join(', ') })



.addFields({ name: "Liens utliles", value: `
[Dashboard](http://green-bot.tk/)-[Inviter le bot](https://discord.com/oauth2/authorize?client_id=${message.client.id}&scope=bot&permissions=8) - [Support](https://discord.gg/X6jZrUf) - [Github](https://github.com/pauldb09/Green-bot)` })
[Dashboard](http://green-bot.tk/)-[Inviter le bot](https://discord.com/oauth2/authorize?client_id=${message.client.user.id}&scope=bot&permissions=8) - [Support](https://discord.gg/nrReAmApVJ) - [Github](https://github.com/pauldb09/Green-bot)` })



Expand All @@ -59,16 +56,17 @@ module.exports = {
const command = commands.get(name) || commands.find(c => c.aliases && c.aliases.includes(name));

if (!command) {
return message.reply(`${emoji.error} La commande indiquée n\'est pas une commande valide !`);
return message.errorMessage(`La commande indiquée n\'est pas une commande valide !`);
}
let des = await message.translate(command.description)
const reportEmbed = new Discord.MessageEmbed()
.setTitle(`Commande \`${command.name}\``)

.setFooter(message.client.footer || 'Green-Bot | Open source bot by 𝖕𝖆𝖚𝖑𝖉𝖇09#9846')
.setFooter(message.client.footer)

.setColor(message.client.color || '#3A871F')
.setColor(message.client.color)

.addField("Description", `\`\`\`\n${command.description || "Aucune description"}\`\`\``)
.addField("Description", `\`\`\`\n${des || "Aucune description"}\`\`\``)
.addField("Usage", `\`\`\`diff\n${prefix}${command.name} ${command.usage || ""}\`\`\``)
.addField("Aliases", `\`\`\`https\n${command.aliases || "Aucune aliases"}\`\`\``);
if (command.exemple) reportEmbed.addField('Exemple', `\`\`\`diff\n${prefix}${command.name} ${command.exemple}\`\`\``);
Expand Down

0 comments on commit 6937a45

Please sign in to comment.