Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (24 sloc) 942 Bytes

Whistler Bot

Whistler Bot is an XMPP bot written in python using SleekXMPP [1], which is a requirement. The bot is designed to handle some commands, and it's easy to extend.

Simple usage:

from import WhistlerBot

bot = WhistlerBot( "", "mypassword" )

The provided console script called whistler is a single bot which reply to a !ping command.


Extending bot

You can extend the bot functionalities, just see for example the code of the whistler console script. In short you can add commands creating a new class from WhistlerBot, and define new functions in the form cmd_ plus the command name, for example, to handle the command ping:

from import WhistlerBot

class MyBot(WhistlerBot):

    def cmd_ping(self, msg, args):
        return "pong"


Something went wrong with that request. Please try again.