1.0.14 • Published 1 year ago
dinteractions.js v1.0.14
dinteractions.js
A discord interactions library.
import { Client } from 'dinteractions.js'
const client = new Client({
applicationId: 'DISCORD_APPLICATION_ID',
publicKey: 'DISCORD_PUBLIC_KEY',
token: 'DISCORD_BOT_TOKEN'
})
client.addCommand({
data: {
name: 'hello',
description: 'Replies with hello message.'
},
handle: async (client, interaction) => {
await client.sendReply(interaction, {
content: 'hello'
})
}
})
client.syncCommands()
client.serve('/interactions', 8000)