Skip to main content
Version: Next

Usage

Manage plugins

In order to install, uninstall, search, update, etc plugins, you'll need the official TSCord CLI:

npm install -g tscord-cli 

To know all the plugin-related commands of the CLI, go to this part of the doc.

Imports

To use a plugin from the template or from another plugin, simply use the global module path followed by a slash and the name of the plugin folder. For example, to import the "Twilio" service class from the "twilio" plugin, simply do the following:

You can use any plugin components wherever you want just by using scoped imports composed of the global module path followed by a slash and the name of the plugin folder.

For example, to import the MyPluginService from the my-plugin plugin, you can do the following:

import { MyPluginService } from '@/services/my-plugin'

Translations

There's a high probability that a plugin you want to use do not support all the same languages than your bot, so you can't add and edit translation for each locales.

To do that:

  1. First run the bot in dev mode after installed the plugin so the translation will be generated inside /src/i18n/.
  2. Copy the file /src/i18n/{locale}/{plugin name}/index.ts as /src/i18n/{locale}/{plugin name}/_custom.ts and put your Translations inside.
  3. Run again the bot in dev mode and your custom translation should be loaded!