mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: command arguments
This commit is contained in:
1 parent
b84ef0cebf
commit
363f110c2f
6 files changed
+191
-25
No files matched your search
@@ -1,9 +0,0 @@
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
|
||||
export const data = new SlashCommandBuilder()
|
||||
.setName('verify')
|
||||
.setDescription('Verifies the user with Blitz');
|
||||
|
||||
export async function execute(interaction) {
|
||||
await interaction.reply('uwu i done nothin here uwu');
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { CommandInteraction, SlashCommandBuilder } from 'discord.js';
|
||||
|
||||
export function execute(interaction: CommandInteraction) {
|
||||
interaction.reply(
|
||||
//@ts-ignore
|
||||
`you said your blitz username was ${interaction.options.getString(
|
||||
'ign',
|
||||
)} in ${
|
||||
//@ts-ignore
|
||||
interaction.options.getString('server')
|
||||
}`,
|
||||
);
|
||||
}
|
||||
|
||||
export const data = new SlashCommandBuilder()
|
||||
.setName('verify')
|
||||
.setDescription('Verifies the user with Blitz')
|
||||
.addStringOption((option) =>
|
||||
option
|
||||
.setName('server')
|
||||
.setDescription('The Blitz server you are in')
|
||||
.setRequired(true)
|
||||
.addChoices(
|
||||
{ name: 'NA', value: 'na' },
|
||||
{ name: 'EU', value: 'eu' },
|
||||
{ name: 'ASIA', value: 'asia' },
|
||||
),
|
||||
)
|
||||
.addStringOption((option) =>
|
||||
option
|
||||
.setName('ign')
|
||||
.setDescription('The username you use in Blitz')
|
||||
.setRequired(true),
|
||||
);
|
||||
Reference in new issue
Block a user