Skip to content
This repository was archived by the owner on Oct 10, 2024. It is now read-only.

Commit d30e5c9

Browse files
committed
feat: version command
1 parent 3399181 commit d30e5c9

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/commands/version.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { SlashCommandBuilder } from '@discordjs/builders';
2+
import { MessageEmbed } from 'discord.js';
3+
import { Command } from '../interfaces/Command';
4+
import { errorHandler } from '../utils/errorHandler';
5+
6+
export const version: Command = {
7+
data: new SlashCommandBuilder()
8+
.setName('version')
9+
.setDescription('Display version info about our bot.'),
10+
run: async (bot, interaction) => {
11+
try {
12+
await interaction.deferReply();
13+
14+
const embed = new MessageEmbed();
15+
embed.setTitle('Introducing EddieBot!!!');
16+
embed.setDescription(`Currently running version ${process.env.ENV}`);
17+
18+
await interaction.editReply({ embeds: [embed] });
19+
} catch (err) {
20+
await errorHandler(bot, err, 'version command');
21+
}
22+
},
23+
};

0 commit comments

Comments
 (0)