JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q70157F
  • License APACHE-2.0

Discord's bot base based on discordjs with modular commands system.

Package Exports

  • @tanuki/discord-bot-base

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@tanuki/discord-bot-base) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Discord Bot Base

NodeICO

DiscordBotBase is an unofficial framework written in TypeScript for discord.js, it allow you to create a discord's bot with the minimum of lines.

Example (minimal)

const { Client } = require('@tanuki/discord-bot-base');

const QueenDecim = new Client({
    token: null,
    ownerId: null,
    prefix: null
});

QueenDecim.logIn()
    .then(() => { console.log('Yo.'); })

See more examples on GitHub.

Features

  • Register a command from file.
    • Options:
      • name - Command name.
      • group - Group of the command.
      • description - A simple description.
      • details - Complete description.
      • ownerOnly - Restrict access to the owner only.
      • args - Array of command's arguments.
        • name - Name of the argument.
        • type - String, Number, Date or other custom type.
        • validator - A checker, must return a [boolean, string].
    • Methods:
      • load - async method executed on command registering.
      • unload - async method executed on command unregistering.
      • run - async method executed when the command has been called.
  • In-built objects sharing across project (including commands) with QueenDecim.shared.
  • In-built commands (enable on-demand).
    • eval - Owner only, execute a code.
    • reload - Owner only, reload a command.
    • help - DM List of registered commands.

If you have any ideas, i am open!

Installation

  1. Our package: npm i --save @tanuki/discord-bot-base
  2. (Optional) Voice support: npm i --save node-opus
  3. (Optional) Faster voice packet encryption/decryption: npm i --save libsodium.js

Contributing

Anyone can contribute to this project with issues and pull requests, i will be happy if you also want to contact me on discord: Tanuki#0003 (Even you're french!).