Table of Contents
This is a OOP plugins system for MadelineProto. This project aims to provide a platform where you can simply write a plugin for madelineproto and simply use it or share it with other people.
The project can:
- Supports all types and methods according to MadelineProto 7.0.
- New web UI.
- Async plugins.
- Regex pattern for plugins.
- Conversation feature.
- new update helper
for using this plugins system you need to follow the following steps.
You'll need Git and composer.
- Clone the repo
git clone https://github.com/OxMohsen/MadelineprotoPluginSystem.git
- Go to project directory:
cd MadelineprotoPluginSystem
- Install packages with composer
composer install
- Edit
Config.php
and then replace all necessary values with those of your project.
- you can run the project with default plugins by using following terminal command.
php index.php
- if you want to add new plugin, run this command:
php helper plugin:make
- if you want to remove a plugin, run this command:
php helper plugin:remove
- if you want to see plugin list, run this command:
php helper plugin:list
After installation and configuration, create a zip of the project contents and transfer it to your host. extract the zip and open the folder url in your browser.
in this project, you can simply access MadelineProto update in plugin via update helper. it's just need to use
$this->MadelineProto->update->getUpdate()->get('DOT.INDEX.SEPARATOR');
in your plugin class. for example if you want to access $update['message']['media']
, you can use
$this->MadelineProto->update->getUpdate()->get('message.media');
if helper can find it, media will be returned otherwise null
will be returned.
Plugin Usage | Description | Admin Only? |
---|---|---|
!broadcast | send a message to all bot chats. | YES |
!phpdoc "function" | send php documentation of target function. | YES |
!delmsgs 100 | delete some messages from supergroups or channel. | YES |
!hash "string" | send the md5, sha1, sha256, sha512 hash of the string. | YES |
!logout | terminate the robot session. | YES |
!restart | forcefully restart and apply changes. (Only work if running via web) | YES |
!shutdown | shut the bot down. | YES |
!generatepassword | send strong password. | NO |
!help | send plugins usage. | NO |
- add new plugins
- eval plugin
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GPL3 License. See LICENSE
for more information.
Mohsen Falakedin - @OxMohsen - oxmohsen@oxmohsen.ir
Project Link: https://github.com/OxMohsen/MadelineprotoPluginSystem