feat: Add context commands
This commit is contained in:
parent
03635e748b
commit
f83a6dd1a3
3 changed files with 70 additions and 14 deletions
14
src/commands/botsex.ts
Normal file
14
src/commands/botsex.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { ApplicationCommandType, ContextMenuCommandBuilder, ContextMenuCommandInteraction, InteractionContextType, Snowflake } from "discord.js";
|
||||
import { ContextCommand } from "../command.ts";
|
||||
|
||||
export default class RailUser extends ContextCommand {
|
||||
contextDefinition: ContextMenuCommandBuilder =
|
||||
new ContextMenuCommandBuilder()
|
||||
.setName('rail')
|
||||
.setType(ApplicationCommandType.User)
|
||||
async run(interaction: ContextMenuCommandInteraction, target: Snowflake): Promise<void> {
|
||||
await interaction.reply(`Raililng <@${target}>.`)
|
||||
await new Promise(resolve => setTimeout(resolve, 1000))
|
||||
await interaction.editReply(`UHGhghgghghgh. Railing successfull.`)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue