Пример #1
0
		}//end allLogic


//onMessage Types=============================================
	bot.onTextMessage((message) => {
	//Needed to create variable for the Outgoing Message

					allLogic(message)
	});   //end bot.onTextMessage((message) =>

	bot.onPictureMessage((message)=> {
					allLogic(message)
	});

	bot.onVideoMessage((message)=> {
					allLogic(message)
	});

	bot.onStickerMessage((message)=> {
		  		allLogic(message)
	});

	bot.onScanDataMessage((message)=> {
					allLogic(message)
	});

	bot.onLinkMessage((message)=> {
					allLogic(message)
	});

Пример #2
0
    sendInfo(message.from);
  } else {
    sendGeneric(message.from);
  }
});

bot.onLinkMessage((message) => {
  sendGeneric(message.from);
});

bot.onPictureMessage((message) => {
  sendGeneric(message.from);
});

bot.onVideoMessage((message) => {
  sendGeneric(message.from);
});

bot.onStickerMessage((message) => {
  sendGeneric(message.from);
});

bot.onScanDataMessage((message) => {
  sendGeneric(message.from);
});

function sendGeneric(sendTo) {
  mixpanel.track('generic_message');
  var myMessage = Bot.Message.text("Hi! I can send you sounds or tell you more about FoundSounds!");
  myMessage.addResponseKeyboard(options, false);
  bot.send(myMessage, sendTo);
Пример #3
0
bot.use(dashbot.logHandler);

bot.onTextMessage(function(message) {
  message.reply('You are right when you say: ' + message.body);
});

bot.onLinkMessage(function(message, next) {
  message.reply('Thank you for the link');
});

bot.onPictureMessage(function(message, next) {
  message.reply('Thank you for the image');
});

bot.onVideoMessage(function(message, next) {
  message.reply('Thank you for the video');
});

bot.onStartChattingMessage(function(message, next) {
  message.reply('Thank you for starting to chat');
});

bot.onScanDataMessage(function(message, next) {
  message.reply('Thank you for the scanned data')
});

bot.onStickerMessage(function(message, next) {
  message.reply('Thank you for the sticker')
});

bot.onIsTypingMessage(function(message, next) {