@points.city/quartz
v3.2.3
Published
1. Run `npm i @points.city/quartz` or `yarn add @points.city/quartz` 2. Setup client and command handler
Downloads
3
Readme
Setup
- Run
npm i @points.city/quartz
oryarn add @points.city/quartz
- Setup client and command handler
Examples
Client Example:
import { Client } from '@points.city/quartz'
import { resolve } from 'path'
const client = new Client({
publicKey: process.env.DISCORD_PUBLIC_KEY!,
token: process.env.DISCORD_TOKEN!,
appID: process.env.DISCORD_APP_ID!,
debug: false
})
client.loadCommands('path to commands')
client.connect(Number(process.env.PORT!))
Command Example:
client.command({
name: 'ping',
description: 'A command that responds pong',
onRun: async ({ send }) => {
return send({
content: 'Pong!'
})
}
})