@synthexia/bdfd-external
TypeScript icon, indicating that this package has built-in type declarations

4.0.1 • Public • Published

Introduction Note

The package was mainly created for better implementation of the Sync feature in our VS Code Extension.

BDFD External

BDFD External is a package for web scrapping BDFD Web App and make requests to it. Get your bot list and Get, Update, Create & Delete commands and variables externally!

npm i @synthexia/bdfd-external | pnpm add @synthexia/bdfd-external

Code Example

import { type BDFDExternalRequestError, Command } from "@synthexia/bdfd-external";

Command.get(authToken, botId, commandId)
    .then((command) => {
        const { name, trigger, code, language } = command;

        console.log(`The "${name}" command's trigger is "${trigger}"`);
        console.log(`Its scripting language is ${language.name}`);
        console.log('Its code:\n', code);
    })
    .catch((e: BDFDExternalRequestError) => {
        console.error(e.statusCode, e.message);
    });

Package Sidebar

Install

npm i @synthexia/bdfd-external

Weekly Downloads

1

Version

4.0.1

License

MIT

Unpacked Size

41.1 kB

Total Files

11

Last publish

Collaborators

  • musical
  • nightnutsky