Developer & API
Expanding Qbot
Qbot provides powerful infrastructure for developers to build new features off of, both with plugin expansions to our Discord Bot, and use cases of our API.
This documentation is a resource for both nontechnical users and developers who are looking to get more out of Qbot.
If you run into any issues or have any questions while working with Qbot, please don't hesitate to join our Discord server, the best place to receive Qbot support and a great resource for any coding project of yours.
The Official Plugin Repository
Lengo Labs maintains the qbot-plugins repository, which is a directory of unofficial plugins you can easily install into your instance of Qbot.
For developers looking to share their plugin with the world, consider creating a pull request to add your plugin to this repository! Information regarding how to contribute is available here.
Developers Guide
Command Format
Here is the format for creating new commands:
import { CommandContext } from '../../structures/addons/CommandAddons';
import { Command } from '../../structures/Command';
class CustomCommand extends Command {
constructor() {
super({
trigger: 'name of the command',
description: 'description for help commands',
type: 'ChatInput',
module: 'name of the folder/module',
args: [],
permissions: [],
});
}
async run(ctx: CommandContext) {
// Your code goes here!
}
}
export default CustomCommand;
Thanks to TypeScript, the properties and methods associated with variables like ctx
, or the configuration for a Command
should autocomplete as soon as you start typing in an editor like Visual Studio Code!