1.1.0 • Published 8 months ago

chars-client v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

Description

A package that provides you with a structure to make a discord bot with a fully functional event handler and slash commands.

Installation

npm i chars-client

How To Use

// index.js

const CommandClient = require('chars-client');

const client = new CommandClient({
  token: '', // Enter your bots token
  commandFolder: '', // Enter your command folder name (defults to commands)
  eventFolder: '', // Enter your event folder name (defults to events)
});

client.start();
// events/ready.js

module.exports = {
  name: 'ready',
  run(client) {
    console.log(`Logged in as ${client.user.tag}`);
  },
};
// commands/ping.js

const { SlashCommandBuilder } = require('@discordjs/builders');

module.exports = {
  data: new SlashCommandBuilder()
    .setName('ping')
    .setDescription('Ping command'),
  async execute(interaction) {
    await interaction.reply('Pong!');
  },
};

Info

Changelog

Help

npm.io

1.1.0

8 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago