loss
This commit is contained in:
parent
6ff915efca
commit
7d035b1479
1 changed files with 58 additions and 0 deletions
58
src/commands/loss.ts
Normal file
58
src/commands/loss.ts
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
import {Command} from "../command.ts";
|
||||||
|
import {
|
||||||
|
ActionRowBuilder,
|
||||||
|
ApplicationIntegrationType, ButtonBuilder, ButtonStyle,
|
||||||
|
ChatInputCommandInteraction, ContainerBuilder,
|
||||||
|
InteractionContextType, type MessageActionRowComponentBuilder, MessageFlags,
|
||||||
|
SlashCommandBuilder
|
||||||
|
} from "discord.js";
|
||||||
|
import { type Config } from "../config.ts";
|
||||||
|
|
||||||
|
export default class LossCommand extends Command {
|
||||||
|
async run(interaction: ChatInputCommandInteraction, config: Config) {
|
||||||
|
const components = [
|
||||||
|
new ContainerBuilder()
|
||||||
|
.addActionRowComponents(
|
||||||
|
new ActionRowBuilder<MessageActionRowComponentBuilder>()
|
||||||
|
.addComponents(
|
||||||
|
new ButtonBuilder()
|
||||||
|
.setStyle(ButtonStyle.Secondary)
|
||||||
|
.setLabel("|")
|
||||||
|
.setCustomId("a"),
|
||||||
|
new ButtonBuilder()
|
||||||
|
.setStyle(ButtonStyle.Secondary)
|
||||||
|
.setLabel("|i")
|
||||||
|
.setCustomId("b"),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.addActionRowComponents(
|
||||||
|
new ActionRowBuilder<MessageActionRowComponentBuilder>()
|
||||||
|
.addComponents(
|
||||||
|
new ButtonBuilder()
|
||||||
|
.setStyle(ButtonStyle.Secondary)
|
||||||
|
.setLabel("||")
|
||||||
|
.setCustomId("c"),
|
||||||
|
new ButtonBuilder()
|
||||||
|
.setStyle(ButtonStyle.Secondary)
|
||||||
|
.setLabel("|_")
|
||||||
|
.setCustomId("d"),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
];
|
||||||
|
await interaction.reply({
|
||||||
|
components: components,
|
||||||
|
flags: [MessageFlags.IsComponentsV2],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
slashCommand = new SlashCommandBuilder()
|
||||||
|
.setName("loss")
|
||||||
|
.setDescription("why").setIntegrationTypes([
|
||||||
|
ApplicationIntegrationType.UserInstall
|
||||||
|
])
|
||||||
|
.setContexts([
|
||||||
|
InteractionContextType.BotDM,
|
||||||
|
InteractionContextType.Guild,
|
||||||
|
InteractionContextType.PrivateChannel
|
||||||
|
]);
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue