Simplify wrapper Unofficial Bot Python using Library from Linepy
- Including MultiThread
- Simply login
- More than fasted
- Included Decorator as soon as possible
-
install Linepy from Pypi not necessary
pip3 install linepy -
install requirements attached
pip3 install -r requirements.txt
from mains import import MainBots
from linepy import OpType
init = MainBots(token="YOUR TOKEN HERE")
"""
declarate this line for your Bots
you can use email and password for login into bot
init = MainBots(email='your email', passwd='your mail password')
or you can pass args for getting QRCode URL
init = MainBots()
"""
def receive_message(client, operations):
"""
use this method to implement your bot if Message income from user
client = :Classes: <linepy.client.LINE object>
this mean for used any functions from clinet e.g: client.sendMessage(..
operation = :Classes: :Tuple: which contains a collection of messages
e.g: Operations(revision=1, createdTime=1553146515644, type=25, reqSeq=994, checksum=None, status=None, param1='0', param2=None, param3=None, message=Message( ...
"""
message_handler = {
OpType.RECEIVE_MESSAGE: receive_message
}
"""
pass message_handler Variable for your function without ()
"""
init.run(handler=message_handler)
#run BOT$ cd
$ cd bots
$ python3 bot.pyFadhiil Rachman / Linepy
