If you have some functions and you want to bot them use bottem ๐
Actually, it is just a wrapper for pyrogram and adds a command handler for all of your module functions.
- Python3+
- Pyrogram
cp config.init.example config.init
vi config.init
from . import my_module
from bottem import Bottem
Bottem(my_module)
my_module.py:
def hello(*args):
return "Hello World!"
def echo(*words):
return " ".join(words)
Then you just need to send commadn to your bot:
/echo This text is echoed.
to receiveThis text is echoed.
reply/hello
to receiveHello World!
reply.
Read pyrogram for more config info.