A plugin based, (user)bot framework for Telegram, somewhat inspired by otouto, and uniborg. For userbot plugins, see qserbot_plugins. For an api bot with more built-in plugins, see tanyabot
- Telethon 1.3
- >= Python 3.5 (Tested on 3.6.6 and 3.7.0)
- A brain probably
/ping
/start
pip install -r requirements.txt
cp example_config.ini config.ini
- Follow this link and login with your phone number
- A Create new application window will appear. Fill in your application details. There is no need to enter any URL, and only the first two fields (App title and Short name) can currently be changed later.
- Click on Create application at the end.
- Add your api id, api hash, and other information to
config.ini
- Create a bot with botfather if you need/want to
- If you want a userbot; add your phone number to
PHONE
, if you want an api bot; add your bot token toTOKEN
- Start bot
start.sh
creates a screen
session called qbot
. Check the logs by doing screen -r qbot
. Detach from the session with ctrl a, d. Stop the bot with ctrl c.
Create a new plugin file using the template {name}plugin.py
. For example my_plugin.py
.
from telethon import events, sync
and from .global_functions import probability
(optional) should be at the top. Then just add whatever you want. See this plugin as an example/template.