Git Product home page Git Product logo

jibot's Introduction

STARTING THE BOT
----------------

    Unix: $ python JibotLaunch.py
	Windows: C:\> python JibotLaunch.py

    A default config file is included as jibot.conf, you can change 
    that file to change the bot settings, or specify your own config file.

COMMAND-LINE OPTIONS
--------------------

JibotLaunch.py supports the following options:
    -v, --verbose   Gives you more output to STDOUT, use twice for more effect
    -c, --config    Lets you specify the config file to load

	
ADDING COMMANDS
---------------

Commands are done via handlers now, to add a new set of commands extend the
MessageHandler class in JibotInterface, in handle you will want to run a check
for the command text against m.cmd, the text after the command character
(usually '?) is parsed by the message class itself if there is any, e.g.:

HelloWorldHandler(MessageHandler):
    def __init__(self,root,name='HelloWorldHandler'):
        MessageHandler.__init__(self,root=root,name=name)
        self._handles=("hello",) #note: this is a tuple
    
    def handle(self,m):
        MessageHandler.handle(self,m)
        if "hello" == m.cmd:
            self._root.say("Hello")
            return True


Then in JibotLaunch you will want to add this as a handler under the CmdHandler
object, eg.:
    
    helloHandler = HelloWorldHandler(root=jibot)
    cmdHandler.add_handler(helloHandler)


The documentation on most of the additions is pretty poor, so bear with us.

jibot's People

Contributors

gwachob avatar imajes avatar jcfischer avatar joi avatar kevinmarks avatar termie avatar vrruiz avatar

Stargazers

 avatar

Watchers

 avatar  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.