of fucking course its oop again

This commit is contained in:
amy 2025-02-19 15:59:18 +03:30
parent 6359da85ea
commit 6ea0e02ee8
No known key found for this signature in database
4 changed files with 134 additions and 52 deletions

26
src/commands/ping.ts Normal file
View file

@ -0,0 +1,26 @@
import {Command} from "../command.ts";
import {
ApplicationIntegrationType,
ChatInputCommandInteraction,
InteractionContextType,
SlashCommandBuilder
} from "discord.js";
export default class PingCommand extends Command {
async run(interaction: ChatInputCommandInteraction, config) {
await interaction.reply({
content: 'Pong!',
});
}
slashCommand = new SlashCommandBuilder()
.setName("ping")
.setDescription("Pong!").setIntegrationTypes([
ApplicationIntegrationType.UserInstall
])
.setContexts([
InteractionContextType.BotDM,
InteractionContextType.Guild,
InteractionContextType.PrivateChannel
]);
}