Create Discord Bot with ease and simplicity.
npx @harmonix-js/cli init bot-name
# pnpm dlx @harmonix-js/cli init bot-name
# yarn dlx @harmonix-js/cli init bot-name
commands/ping.ts
import { defineCommand } from '@harmonix-js/core'
export default defineCommand(
{
description: 'Ping command'
},
(client, message) => {
message.reply('Pong!')
}
)
events/ready.ts
import { defineEvent } from '@harmonix-js/core'
export default defineEvent<'ready'>((client) => {
console.log('Bot is ready!')
})