Botkit connector for Ryver
npm install botkit-ryver-connectorbotkit-ryver-connector
===================
Botkit connector for Ryver.
chat_created - for DMs and Team/Forum chats
postcomment_created - for post comments
taskcomment_created - for task comments
direct_message message type.
@mention will be categorized as the direct_mention message type.
@mention will be categorized as the mention message type.
ambient message type.
allowBotOriginatedMessages: true.
controller.hears() and controller.on() functions to ensure you are not responding to your own bot's message. This can be determined using the bot.identity object.
command.
controller.hears('^/mycommand', 'command', function (bot, message) {
bot.replyImmediate(message, 'Processing your command now...');
// some longer running process could occur here, such as making http requests.
bot.reply(message, 'The process is now complete');
})
`
Bot features
As well as the standard bot.say() and bot.reply() functions, we've included some addition functions for ease of development.
`
bot.sendPostComment(text, postId, cb);
bot.sendTaskComment(text, taskId, cb);
bot.sendForumChatMessage(text, forumId, ephemeralUserId, cb);
bot.sendWorkroomChatMessage(text, workroomId, ephemeralUserId, cb);
bot.sendDirectChatMessage(text, userId, isEphemeral, cb);
`
Additionally, during the start-up phase we load the bot's identity from Ryver and set it on the bot:
`
var botUserId = bot.identity.id;
var username = bot.identity.name;
`
Notes
Ryver does not support buttons or quick_replies` yet.