@spark.ts/handler
TypeScript icon, indicating that this package has built-in type declarations

1.6.4 • Public • Published

Spark Handler

A Discord.js Handler built on TypeScript

Installation

  • To install, run npm i @spark.ts/handler.

Example Usage

TypeScript / ESM

import { SparkClient } from '@spark.ts/handler';

const client = new SparkClient({
  intents: ['Guilds', 'MessageContent', 'GuildMessages'], // djs intents
  directories: {
    commands: './src/commands', // point this to the ./dist/commands directory if you're using typescript
  },
  logLevel: 'info', // log level used for the logger, if this is on `debug`, you'll see debug messages
});

client.login(process.env.DISCORD_TOKEN);

CommonJS

const { SparkClient } = require('@spark.ts/handler');

const client = new SparkClient({
  intents: ['Guilds', 'MessageContent', 'GuildMessages'], // djs intents
  directories: {
    commands: './src/commands', // point this to the ./dist/commands directory if you're using typescript
  },
  logLevel: 'info', // log level used for the logger, if this is on `debug`, you'll see debug messages
});

client.login(process.env.DISCORD_TOKEN);

Readme

Keywords

none

Package Sidebar

Install

npm i @spark.ts/handler

Weekly Downloads

2

Version

1.6.4

License

MIT

Unpacked Size

39.3 kB

Total Files

9

Last publish

Collaborators

  • durocodes