All pastes #2070021 Raw Edit

Unnamed

public text v1 · immutable
#2070021 ·published 2011-05-27 06:22 UTC
rendered paste body
exports.bot = {
    
    onmessage : function(msg) {
        // do something with msg
        console.log(msg);
    },
    
    // Commands is a list of commands you can send to your bot, like: /start param1 param2 param3
    commands : {
        
        'start' : function(params) {
            // start up
            console.log('Bot.start', params);
        },
        
        'stop' : function(params) {
            // shut down
            console.log('Bot.stop', params);
        },
        
        'eatbagel' : function(params) {
            // consume bagel
            console.log('Bot.eatbagel', params);
        }
        
    } //-commands
    
};