Skip to content

E-boi/periljs

Repository files navigation

periljs

NPM | Discord

A library for interaction with Discord

Installation

npm i @e-boi/periljs

Basic Usage

// this example shows a basic usage of slash commands

import { Client } from '@e-boi/periljs';

const peril = new Client({ token: 'bot token', intents: ['GUILDS'] });

// create a slash command
peril.commands.set(
  {
    type: 'CHAT_INPUT',
    name: 'ping',
    description: 'example slash command made with periljs',
  },
  interaction => {
    interaction.reply('pong!');
  }
);

peril.on('ready', bot => {
  console.log(`logged in as "${bot.tag}"`);
});

// logs in to discord
peril.connect();

More examples can be found here

Documentation

coming soon

About

A nodejs api wrapper for discord!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published