-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Communaute-Events/dev
Fixed undefined serverInfo and modif. help command
- Loading branch information
Showing
8 changed files
with
78 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Commands: | ||
- name: "Aide" | ||
command: "help" | ||
description: "Affiche ce menu" | ||
- name: "Latence" | ||
command: "ping" | ||
description: "Répond avec la latence en ms du bot" | ||
|
||
Admin Commands: | ||
- name: "Alertes" | ||
command: "alert" | ||
category: true | ||
description: "Gère les alertes d'évents du serveur" | ||
subcommands: | ||
- command: "info" | ||
description: "Affiche des informations à propos de la configuration des alertes" | ||
- command: "enable" | ||
description: "Active les alertes d'évents" | ||
- command: "disable" | ||
description: "Désactive les alertes d'évents" | ||
- command: "setchannel" | ||
description: "Défini le channel d'alerte pour les évents" | ||
- command: "pick" | ||
description: "Active/Désactive certain serveurs d'évents" | ||
- command: "roles bind" | ||
description: "Permet de définir le rôle à ping pour un certain event" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { HelpCommandConfig } from '@src/types'; | ||
import { SlashCommandBuilder, EmbedBuilder, AttachmentBuilder } from 'discord.js' | ||
const Theme = loadYaml("bot/info.yml") | ||
const HelpConfig: HelpCommandConfig = loadYaml("commands/help.yml") | ||
|
||
// @command | ||
// here cuz otherwise tsc removes it | ||
export default { | ||
data: new SlashCommandBuilder() | ||
.setName('help') | ||
.setDescription('Shows the help menu'), | ||
async execute(interaction) { | ||
const embed = new EmbedBuilder() | ||
.setTitle("Menu d'aide") | ||
.setColor(Theme.Color) | ||
.setThumbnail("attachment://question_mark.png") | ||
.setDescription("Voici une liste des actions proposées par **Event Helper**.") | ||
.setFields( | ||
{ name: "Commandes", value: HelpConfig.Commands.map(cmd => `** **\n**${cmd.name}**\n${cmd.category ? cmd.subcommands.map(sub => "`/" + cmd.command + sub.command + "` : " + sub.description + "\n").join('') + "\n" : "`/" + cmd.command + "` : " + cmd.description + "\n"}`).join('')}, | ||
{ name: "Commandes Admins", value: HelpConfig['Admin Commands'].map(cmd => `** **\n**${cmd.name}**\n${cmd.category ? cmd.subcommands.map(sub => "`/" + cmd.command + sub.command + "` : " + sub.description + "\n").join('') + "\n" : "`/" + cmd.command + "` : " + cmd.description + "\n"}`).join('')}, | ||
) | ||
await interaction.reply({embeds: [embed], files: [new AttachmentBuilder("src/images/question_mark.png")]}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters