bot base
This commit is contained in:
19
server/commands/echo.ts
Normal file
19
server/commands/echo.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { ApplicationCommandOptionType } from 'discord.js'
|
||||
import { Command } from '../structures/command'
|
||||
import { RunOptions } from '../types/commandTypes'
|
||||
export default new Command({
|
||||
name: 'echo',
|
||||
description: 'Echoes a text',
|
||||
options: [
|
||||
{
|
||||
name: 'echo',
|
||||
description: 'The text to echo',
|
||||
type: ApplicationCommandOptionType.String,
|
||||
required: true
|
||||
}
|
||||
],
|
||||
run: async (interaction: RunOptions) => {
|
||||
console.log('echo called')
|
||||
interaction.interaction.reply(interaction.toString())
|
||||
}
|
||||
})
|
9
server/commands/pong.ts
Normal file
9
server/commands/pong.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { Command } from '../structures/command'
|
||||
export default new Command({
|
||||
name: 'ping',
|
||||
description: 'Does a pong, duh',
|
||||
run: async ({ interaction }) => {
|
||||
console.log(`Ping interaction received.`)
|
||||
interaction.followUp('pong')
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user