samuri51 / chillybot

a turntable bot created by a moderator of straight_chillin11
12 stars 12 forks source link

Mod Greeting #47

Closed ghost closed 11 years ago

ghost commented 11 years ago

How can I make my bot, Chillster, say a special greeting, when a moderator walks into the room.

samuri51 commented 11 years ago

in the context of chillybot it would be something like this. you can use the switch statements like before if you want multiple random greetings, this does not greet individuals with different greetings though.... basic example here just greets a generic moderator with the given message.

bot.on('registered', function(data)
{
    if(modList.indexOf(data.user[0].userid) != -1) //if user entering is in mod list
    {
        bot.speak('custom greeting goes where this message is');
    }
});
ghost commented 11 years ago

Thanks :)