7

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.

closed as too localized by Marco Ceppi Apr 12 '12 at 13:46

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

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

Browse other questions tagged .