Giter Club home page Giter Club logo

whistler's Introduction

Whistler Bot

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

Latest PyPI version Number of PyPI downloads

Simple usage:

$ whistler  myconfig.conf

Create bot programmatically:

from whistler.bot import WhistlerBot

bot = WhistlerBot( "[email protected]", "mypassword" )
bot.start()

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_<command> plus the command name, for example, to handle the command ping.

from whistler.bot import WhistlerBot

class MyBot(WhistlerBot):

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

Example chat

An example of chat with Whistler

Whistler allows to send private commands in usual jabber (and of course GTalk and Google Hangouts) chat.

Also public commands are available, prefixed them with "!" (exclamation mark), as also reply to a direct mention in the form "whistler:" or "whistler,", where "whistler" is the nickname of the bot in the MUC:

(Me) whistler: uptime
(whistler) 17:33:01 up 2 days, ...

Currently Whistler support a number of features, including tweet from command, shorting url action and so on...

You can see the mixins directory to see a number of examples for whistler and how easy is to extend.

Contributions

Any new mixin or functionality is welcome to Whistler. If you has been developed new one or want new feature, please send me a message or a pull request.

whistler's People

Contributors

aperezdc avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.