bubble-engine

Bubble Engine allows you to easily and quickly create bots based on the discord.js library.

Stats

StarsIssuesVersionUpdatedCreatedSize
bubble-engine
1.0.92 months ago3 months agoMinified + gzip package size for bubble-engine in KB

Readme

Bubble engine

This package allows you to easily and quickly create bots based on the discord.js library.

Bubble banner

Features

  • Automatic import of commands from a specified folder
  • Command wizard via terminal
  • Transparent and reliable error return system
  • Simple configuration with an .env file
  • Fast support in case of problems
  • Frequent updates

Install

$ npm i bubble-engine

Usage

The basic way to use a package in the main bot file.

const Bubble = require("bubble-engine")
Bubble.connect(token)

After using Bubble.connect("TOKEN"), the package will automatically search the /commands folder for commands. Any file in this folder ending in .js will be taken as a command. Here is an example command:

module.exports = {
    name: 'ping', // command name; after typing ex. /ping the command will be run
    description: 'Ping!', // command description, displayed under name
    global: true, // determines whether the command is global or only to the test server
    commandOptions: null, // arguments to include in the command
    execute(interaction) {
        
        client.api.interactions(interaction.id, interaction.token).callback.post({data: {
            type: 4,
            data: {
                    content: `:ping_pong: Pong: ${client.ws.ping}ms!` // Send a reply to the user
                }
            }
        })
    },
};

Config

Replace TOKEN value in Bubble.connect("TOKEN") with your bot token. Example: Bubble.connect("123456789")

Ready! After this simple setup you can use the Bubble Engine. Happy coding ⌨

© 2021 Titon Design. Code published under the ISC license

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.