bottender
Advanced tools
Changelog
0.14.25 / 2018-03-13
/exit
to exitverifyToken
to MessengerBot
or MessengerConnector
(#204)Support both:
const bot = new MessengerBot({
accessToken: config.accessToken,
appSecret: config.appSecret,
});
const server = createServer(bot, { verifyToken: config.verifyToken });
const bot = new MessengerBot({
accessToken: config.accessToken,
appSecret: config.appSecret,
verifyToken: config.verifyToken,
});
const server = createServer(bot);
Changelog
0.14.24 / 2018-03-11
@slack/client
deps to fix security vulnerabilityChangelog
0.14.23 / 2018-02-27
context.requestThreadControl();
context.event.isRequestThreadControl; // true or false
context.event.requestThreadControl;
/*
{
metadata: 'additional content that the caller wants to set',
requested_owner_app_id: '123456789',
}
*/
Changelog
0.14.22 / 2018-02-12
ConsoleBot
You > /payload PAYLOAD
Receive event:
context.event.isMessage; // false
context.event.message; // null
context.event.isText; // false
context.event.text; // null
context.event.isPayload; // true
context.event.payload; // PAYLOAD
Changelog
0.14.21 / 2018-02-05
ConsoleContext
with fallbackMethods: true
#184, for example:const bot = new ConsoleBot({ fallbackMethods: true });
bot.onEvent(async (context) => {
await context.sendText('Hello World');
await context.sendImage('https://example.com/vr.jpg');
await context.sendButtonTemplate('What do you want to do next?', [
{
type: 'web_url',
url: 'https://petersapparel.parseapp.com',
title: 'Show Website',
},
{
type: 'postback',
title: 'Start Chatting',
payload: 'USER_DEFINED_PAYLOAD',
},
]);
});
Result:
Bot > Hello World
Bot > sendImage: ["https://example.com/vr.jpg"]
Bot > sendButtonTemplate: ["What do you want to do next?",[{"type":"web_url","url":"https://petersapparel.parseapp.com","title":"Show Website"},{"type":"postback","title":"Start Chatting","payload":"USER_DEFINED_PAYLOAD"}]]
Changelog
0.14.20 / 2018-01-30
ConsoleBot
to fix some format issue.Changelog
0.14.19 / 2018-01-25
--ngrok-port
when setting webhook #171. For example:bottender messenger webhook set --ngrok-port 1234
bottender telegram webhook set --ngrok-port 1234
bottender viber webhook set --ngrok-port 1234
Changelog
0.14.18 / 2018-01-18
initialState
#164context.answerInlineQuery
for Telegram #165:context.answerInlineQuery(
[
{
type: 'photo',
id: 'UNIQUE_ID',
photo_file_id: 'FILE_ID',
title: 'PHOTO_TITLE',
},
{
type: 'audio',
id: 'UNIQUE_ID',
audio_file_id: 'FILE_ID',
caption: 'AUDIO_TITLE',
},
],
{
cache_time: 1000,
}
);
Changelog
0.14.17 / 2018-01-17
const { SlackBot } = require('bottender');
const bot = new SlackBot({
accessToken: '__FILL_YOUR_TOKEN_HERE__',
});
bot.onEvent(async (context) => {
await context.sendText('Hello World');
});
bot.createRtmRuntime();
message
edited_message
channel_post
edited_channel_post
inline_query
chosen_inline_result
callback_query
shipping_query
pre_checkout_query
Changelog
0.14.16 / 2018-01-16
If getUserProfile
throw error, session.user
will fallback to have only id
and _updatedAt
keys.
event.isEditedMessage
event.editedMessage
event.isChannelPost
event.channelPost
event.isEditedChannelPost
event.editedChannelPost
event.isInlineQuery
event.inlineQuery
event.isChosenInlineResult
event.chosenInlineResult
event.isShippingQuery
event.shippingQuery
event.isPreCheckoutQuery
event.preCheckoutQuery