mirror of
https://github.com/thedrewen/protojx-manager.git
synced 2026-03-21 09:48:56 +01:00
24 lines
968 B
TypeScript
24 lines
968 B
TypeScript
import { ApplicationIntegrationType, ChatInputCommandInteraction, InteractionContextType, MessageFlags, SlashCommandBuilder } from "discord.js";
|
|
import statusService from "../../services/status.service";
|
|
import { CommandDefinition} from "../../type";
|
|
|
|
const cmd : CommandDefinition = {
|
|
data: new SlashCommandBuilder()
|
|
.setName('status')
|
|
.setDescription('Give statut of servers.')
|
|
.setIntegrationTypes(
|
|
ApplicationIntegrationType.GuildInstall,
|
|
ApplicationIntegrationType.UserInstall
|
|
)
|
|
.setContexts(
|
|
InteractionContextType.BotDM,
|
|
InteractionContextType.Guild,
|
|
InteractionContextType.PrivateChannel
|
|
),
|
|
async execute(interaction : ChatInputCommandInteraction) {
|
|
await interaction.deferReply();
|
|
await interaction.editReply({components: [statusService.getUpdatedContainer()], flags: MessageFlags.IsComponentsV2});
|
|
}
|
|
}
|
|
|
|
export default cmd; |