1.0.0 • Published 1 year ago
@aoitelegram/plugins v1.0.0
@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.
1.0.0
1 year ago