Skip to content

pointscity/quartz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quartz

The heart of [Points](https://points.city)

Setup

  1. Run npm i @points.city/quartz or yarn add @points.city/quartz
  2. 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!'
    })
  }
})