1.0.1 • Published 3 years ago

bot-structures v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

🚀 Como usar

Uma biblioteca feita para facilitar a sua criação de bots para o Discord.

  • Exemplo:
//Importa a classe
const { Structure } = require('bot-structure');
//importa o token do bot
const { token } = require('./config.json');

//Aqui está definindo onde será as pastas que o handler irá checar
const [cmdPath, eventPath] = ['src/commands/', 'src/events/'];

//Cria uma nova instância da classe
const client = new Structure({ cmdPath, eventPath });
//Inicia o seu bot
client.connect(token);
  • Exemplo de esquema de pastas
src
|
|__commands
    |__help.js
    |__ping.js
|
|__events
    |__messageCreate.js
    |__ready.js
|
|__index.js

⚙️ Sintaxe de criação de comando:

exports.run = (client, message, args) => {
    /*
    *  //Escreva o seu código aqui.
    *
    *
    *
    /
};

exports.config = {
    name: 'commandName'
};