8000 GitHub - adnanrinaldi/Anjani: Telegram group management bot
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

adnanrinaldi/Anjani

 
 

Repository files navigation

Anjani

forthebadge made-with-python

Codacy Badge

A modular Telegram group management bot running with Python based on Pyrogram.

Requirements

Set Up

Configuration

Set up your bot configuration variables by renaming confing.env_sample to config.env and edit it with your own values.

Dependencies

Install all required dependencies by running pip3 install -r requirements.txt.

Run

Once everyting set up, start the client by running python3 -m anjani_bot

Plugin

Creating your own Modules

We try our best to simplify module creation.

All you need is a <plugin>.py file in anjani_bot/plugins.

Import the Client from anjani_bot import anjani, plugins.

Create a class that inherit with plugins.Plugins And give that Class name attribute to name the plugin. eg:

from anjani_bot import anjani, plugin

class class_name(plugin.Plugin):
    name: "plugin name"

Then to add a handler use a decorator @anjani.on_command("<trigger>") or other update handler. Command Trigger can be a string or a list of strings.

The __migrate__() function is used for migrating chats - when a chat is upgraded to a supergroup, the ID changes, so it is necessary to migrate it in the DB.

Translator

You may send us a pull request to help translating other languages.

Credits

About

Telegram group management bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.2%
  • Shell 0.8%
0