-
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.
- Loading branch information
1 parent
73df94a
commit 66fcea6
Showing
2 changed files
with
43 additions
and
0 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,35 @@ | ||
// @command | ||
import { SlashCommandBuilder, EmbedBuilder, AttachmentBuilder, time } from 'discord.js' | ||
import { botInfo } from '@src/index'; | ||
import { getSources } from '../alerts/functions'; | ||
const Theme = loadYaml("bot/info.yml") | ||
|
||
// @command | ||
// here cuz otherwise tsc removes it | ||
export default { | ||
data: new SlashCommandBuilder() | ||
.setName('info') | ||
.setDescription('Montre des informations à propos du bot'), | ||
async execute(interaction) { | ||
const desc = ` | ||
**Events Helper** par <:ce:1184928871984926781> Communauté Events | ||
__WebSocket__ | ||
Status de la connection au WebSocket: ${botInfo.websocket ? '✅' : '❌'} | ||
Dernière connection: ${time(new Date())} | ||
__Sources__ | ||
${(await getSources()).map(src => `${src.emoji} - **${src.name}**\n`)} | ||
__Autres__ | ||
Version du bot: \`${process.env.npm_package_version? process.env.npm_package_version : '? Inconnu'}\` | ||
Serveur du support: https://commu.events/discord | ||
` | ||
|
||
const embed = new EmbedBuilder() | ||
.setTitle("Informations sur le bot") | ||
.setColor(Theme.Color) | ||
.setThumbnail("attachment://question_mark.png") | ||
.setDescription(desc) | ||
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