Skip to content

OxMohsen/MadelineprotoPluginSystem

 
 

Repository files navigation

Contributors Forks Stargazers Issues GPL3 License Telegram


Madelineproto Plugin System Logo

MadelineprotoPluginSystem

plugin system for madelineproto
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

Product Name Screen Shot

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

(back to top)

Built With

(back to top)

Getting Started

for using this plugins system you need to follow the following steps.

Prerequisites

You'll need Git and composer.

Installation

  1. Clone the repo
    git clone https://github.com/OxMohsen/MadelineprotoPluginSystem.git
  2. Go to project directory:
    cd MadelineprotoPluginSystem
  3. Install packages with composer
    composer install
  4. Edit Config.php and then replace all necessary values with those of your project.

(back to top)

Usage

use through terminal.

  • 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

use through browser.

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.

new update helper

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.

(back to top)

Plugin list

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

(back to top)

Roadmap

  • add new plugins
    • eval plugin

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the GPL3 License. See LICENSE for more information.

(back to top)

Contact

Mohsen Falakedin - @OxMohsen - oxmohsen@oxmohsen.ir

Project Link: https://github.com/OxMohsen/MadelineprotoPluginSystem

(back to top)

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%