@aoitelegram/plugins
v1.0.0
Published
A manager of plugins for the aoitelegram
Downloads
4
Readme
@aoitelegram/plugins
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:
| Parameter | Description | | ----------------- | ------------------------------------------------------------------------------------- | | logger | Show notifications upon successful plugin loading. | | strictMode | Determines if the plugin can overwrite existing functions (true - no / false - yes). | | excludedFunctions | Exclude all functions from the plugin (i.e., functions listed here cannot be loaded). | | includedFunctions | Load 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.