Palringo python bot

March 15, 2015

This is a Palringo bot developed in python by me. It's completely open source and easy to build upon. The bot uses Python 3.4+

In order to log on you must enter your credentials on line:

##LOGON INFORMATION HERE ===================================
parser.sendLogon('[email protected]')
passwd = "password"
## ---------------------------------------------------------

In order to alter the bot's functionality you must change the code in There are a few functions that handle data, such as:


parser.getCommand()   #gets the packet commend
parser.getSourceID()  #returns the userID of the person who sent the message(packet)
parser.getTargetID()  #returns the group the message(packet) was sent in
parser.getPayload()   #returns the packet payload. whether it be a message or any other information

#handy functions

parser.sendGroupMessage('groupID', 'message')
parser.sendPrivateMessage('userID', 'message')

I've included in the source code a few examples on what the bot can do based on packets/messages sent to it. Example:

#if a group message comes in
if ( parser.getCommand() == 'GroupMESG'):
  ## if someone talks
    if ( parser.getSourceID() != 0 ):
        parser.sendGroupMessage(parser.getTargetID(), "shut up")

As you can see, you can change the bot to behave how you want, which is pretty cool, the only problem is that this is not yet complete

The bot and source-code are free for download from github under an MIT license. palring-python-bot-3.4.

Connect with Ariel on Twitter &