This repository was archived by the owner on May 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 1- import { EmbedBuilder , ChatInputCommandInteraction } from "discord.js" ;
2- import { KOGBot } from "../../index.js" ;
1+ import { EmbedBuilder , ChatInputCommandInteraction , SlashCommandBuilder } from "discord.js" ;
2+ import { KOGBot } from "../../index.js" ;
33
44class KillCommand implements SlashCommand {
55 name = 'kill' ;
66 description = 'Kill a user (in messages).' ;
77 subcommands = [ ] ;
88 parameters = [ ] ;
9- dev = true ;
9+ dev = true ;
1010 kogBot : KOGBot ;
1111
1212 constructor ( kogBot : KOGBot ) {
1313 this . kogBot = kogBot ;
1414 }
1515
16+ getCommandData ( ) {
17+ return new SlashCommandBuilder ( )
18+ . setName ( this . name )
19+ . setDescription ( this . description )
20+ . addUserOption ( option =>
21+ option . setName ( 'user' )
22+ . setDescription ( 'The user to kill' )
23+ . setRequired ( true )
24+ ) ;
25+ }
26+
1627 async execute ( interaction : ChatInputCommandInteraction ) : Promise < void > {
1728 try {
18-
1929 const user = interaction . options . getUser ( 'user' ) ;
2030 if ( ! user ) {
2131 interaction . reply ( "No user was mentioned. Please mention a user to kill." ) ;
You can’t perform that action at this time.
0 commit comments