23 lines
547 B
TypeScript
23 lines
547 B
TypeScript
import {SlashCommandBuilder} from 'discord.js';
|
|
|
|
import {BasePlugin, type Settings} from '../plugin';
|
|
|
|
export class PingPlugin extends BasePlugin {
|
|
constructor(settings: Settings) {
|
|
super(settings);
|
|
this.commands = [
|
|
{
|
|
data: new SlashCommandBuilder()
|
|
.setName('ping')
|
|
.setDescription('Send a ping to the bot'),
|
|
|
|
execute: async interaction => {
|
|
await interaction.reply(
|
|
`Pong! This command was run by ${interaction.user.username}, who joined on ${interaction.member?.joinedAt}.`,
|
|
);
|
|
},
|
|
},
|
|
];
|
|
}
|
|
}
|