Skip to content

Instantly share code, notes, and snippets.

@voipnorm
Created September 28, 2016 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voipnorm/ca8a0048b19078b1f2676b90eae266f6 to your computer and use it in GitHub Desktop.
Save voipnorm/ca8a0048b19078b1f2676b90eae266f6 to your computer and use it in GitHub Desktop.
//Welcome message when a new room or 1:1 is spawned with the bot
flint.on('spawn', function(bot) {
flint.debug('new bot spawned in room: %s', bot.room.id);
//presents different messages based on room or 1:1
if(bot.isGroup){
bot.say("Hi! To get started just type @examplebot hello.");
return
}else{
bot.say("Hi! To get started just type hello.");
return
};
bot.repeat;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment