1.0.0 • Published 1 year ago

@aoitelegram/plugins v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

@aoitelegram/plugins

NPM Version Bot API NPM Downloads License

Installation

npm i @aoitelegram/plugins

Usage

  • This library is official.
const { AoiClient } = require("aoitelegram");
const { PluginManager } = require("@aoitelegram/plugins");

const client = new AoiClient({
  // Bot configuration
});

const plugins = new PluginManager({
  aoitelegram: client,
  searchingForPlugins: true,
});

plugins.loadPlugins(["giveaway"], {
  logger: true,
  strictMode: false,
  excludedFunctions: [],
  includedFunctions: [],
});

plugins.loadDirPlugins("path", {
  logger: true,
  strictMode: false,
  excludedFunctions: [],
  includedFunctions: [],
});

client.connect();

Parameters method:

ParameterDescription
loggerShow notifications upon successful plugin loading.
strictModeDetermines if the plugin can overwrite existing functions (true - no / false - yes).
excludedFunctionsExclude all functions from the plugin (i.e., functions listed here cannot be loaded).
includedFunctionsLoad only these specified functions from the plugin.

Documentation

For detailed documentation and usage instructions, please refer to the aoitelegram Wiki.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please create a GitHub issue or submit a pull request.

1.0.0

1 year ago