chars-client
v1.1.0
Published
<p align="center"> <img width="250" src="https://cdn.discordapp.com/attachments/1138248259228422204/1145384448293093457/KCMvlKq.png"> </p> <h1 align="center"> Chars Client </h1> <p align="center"> <b >Build Bots Fast With An Easy To Use Package</
Downloads
3
Readme
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!');
},
};