Skip to content

Editor Integration

Constantly switching between your code editor and documentation to check available commands can disrupt your workflow. You can streamline this by integrating type definitions directly into your editor’s language server.

Create a local copy of the commands.d.ts file and save it to your documents folder.

Then setup a jsconfig.json to include this type definitions file:

jsconfig.json
{
"include": ["bots/**/*", "commands.d.ts"]
}

The final result might look something like:

  • Directory

    documents/vexed/

    • jsconfig.json

    • commands.d.ts

    • Directory

      bots/

      • my_bot.js
  • Typings for cmd.register_command are awkward, particularly bot and ctx are not included in the Command interface.