If FlackBot was to become a permanent fixture in chat what are some features which should be added to provide merit for it's presence in chat?

As with most other polls please only post one suggestion per answer. In addition to your idea please provide use cases, examples, or other supporting arguments for said feature.

Technical information by George Edison:

In addition to suggesting ideas, actual code for the ideas would be appreciated too. So if you have worked with JavaScript before, you can easily write the code for your idea yourself.

Each 'command' includes two components:

  • a RegEx or function that matches against the user's input
  • a function that will be executed upon a successful match

So for example, to have FlackBot say 'Hello username.' when a user types 'My name is username.' you would have the following:

/* pattern */
/^my name is (?:\w+)$/i

/* function */
function($, input, message_data, output_callback) {
    return 'Hello ' + input.match(/^my name is (\w+)$/i)[1] + '.';

Explanation of arguments to the function:

The function that gets executed when the RegEx is matched gets four parameters passed to it. The first is a reference to jQuery. The second is the user's input. The third is metadata about the message the user sent (like username, timestamp). The fourth parameter is a function that can be called to output a message to the user - this is useful if you need to make AJAX requests in order to reply to the user. When using output_callback, be sure to return null from the function.

  • 3
    For those who have NO CLUE what FlackBot is, please read: stackapps.com/questions/2444/…
    – Thomas Ward Mod
    Commented Jul 25, 2011 at 14:02
  • 1
    Can I suggest ideas? :) Commented Jul 25, 2011 at 16:59
  • @GeorgeEdison Yes :) Commented Jul 25, 2011 at 17:11
  • @Marco: I added some technical information. Commented Jul 25, 2011 at 17:48
  • Shouldn't this be moved to stackapps? I mean, Flackbot (when he was around) wasn't really Ask Ubuntu-specific.
    – jrg
    Commented Apr 12, 2012 at 11:38
  • @jrg He lived in the Ask Ubuntu room (soley) when this was topic was created a year ago. Commented Apr 12, 2012 at 13:46


Browse other questions tagged .