plugin.json

All the plugin.json options for a Bit Core Plugin and what they're used for

All the plugin.json options for a Bit Core Plugin and what they're used for

OptionDescriptionAccepted ValuesDefault Value

name

The plugins name

string

Bit Core

id

The plugins ID

string (requirements below)

bit-core

developer

The plugins developer

string

Lockyz Media

version

What version the plugin is

string

2024.1.0

support

A place to go to get support

string

update_url

A url pointing to a json file used for the update notification system

string/url

events

Whether the plugin has events or not

boolean (true/false)

true

commands

whether the plugin has slash commands or not

array

see below

has_index

Whether the plugin can start on bot startup or not

boolean (true/false)

true

main_file

The file the bot should use to find the startup function

string

index.js

list_in_plugins_command

Whether to display the plugin in the plugins command

boolean (true/false)

true

requirements

The various requirements for the plugin

array

See Below

Example

{
    "name": "Bit Core",
    "id": "bit-core",
    "developer": "Lockyz Media",
    "version": "2024.1.0",
    "support": "https://github.com/Lockyz-Media/bit/issues",
    "update_url": "https://cdn.lockyzmedia.com/discord/bots/bit/plugins/core/update.json",
    "events": true,
    "commands": {
        "application": true,
        "message": true
    },
    "has_index": true,
    "main_file": "index.js",
    "list_in_plugins_command": true,
    "requirements": {
        "bit": {
            "version": "2024.1.0",
            "level": "1"
        }
    }
}

Commands

Bit 2025.1 now allows for both message and application commands.

The commands array in the plugin.json file looks like this

"commands": {
    "application": true,
    "message": true
}

Plugin IDs

Plugins use an ID system to make it easier for developers wanting to use your code, to do their code. Plugin IDs will be used for plugin requirements, querying plugins (ex. loading the plugin list), and other bot functions. All plugins must use unique ID's when loaded into the bot, otherwise the bot will disable the plugin loaded second (We will only enforce plugin ID's in our certified plugins program. Plugins with the ID of bit-core will cause the bot to crash).

Plugin ID requirements are:

MUST be in Kebab Case (ex. kebab-case)!

CANNOT include numbers!

CANNOT include symbols bar the dash (-) that replaces the space!

CANNOT include a space - this WILL break the bot, use a dash (-) instead!

CANNOT use the name bit-core

CANNOT use offensive language.

Plugin Requirements

Plugins Requirements are being saved for another update. Please keep the only requirement as Bit.

The bot will cross reference the plugin requirements array within the plugin.json file with the bots plugin list (Currently not available). Each requirement will be listed as plugin-id:version within the Plugin List.

Plugins are required to have bit as a level 1 requirement as the requirements system has replaced the old bitVersion setting.

For Example

"requirements": {
    "bit": {
        "version": "2025.1.0",
        "level": "1",
    },
    "jupiter": {
        "version": "0.2.0",
        "level": "2",
    },
    "dismon": {
        "version": "2.0.0",
        "level": "3",
    },
    "logging": {
        "version": "2.0.0",
        "level": "4",
    }
}

The above code will

  1. Check if the current bit version is 2025.1.0

  2. Fail to start if bit is not installed or the version is not 2025.1.0

  3. Check if the Jupiter plugin is installed

  4. Fail to start if the plugin isn't loaded, but will output to the console of the version is not the same.

  5. Check if the bot has the Dismon Plugin 2.0.0

  6. If Dismon is not found, the bot will instead output to the console and parts of this plugin will be disabled. If the version does not match, the bot will only output to the console.

  7. Check if the logging plugin is installed

  8. Fail to start if it is.

There are 3 requirement levels

Level 1, requires the external plugin at that specific version be loaded for your plugin to work.

Level 2, requires the external plugin to be loaded regardless of said external plugins version

Level 3, is basically a soft requirement, the external plugin is not "required" but part of the your plugin will not work without it. (You should include a check for this in your code)

Level 4, the plugin will NOT start if a plugin of this level is also loaded. This can be used for plugins that are incompatible with yours.

Last updated

Copyright 2018-2024 Lockyz Media