bottender
Advanced tools
Changelog
1.4.4 / 2020-05-06
Changelog
1.4.3 / 2020-04-29
Changelog
1.4.2 / 2020-04-24
getClient
function (#744)Changelog
1.4.1 / 2020-04-17
Changelog
1.4.0 / 2020-04-15
namespace.any
for better readability (#719):function App() {
return router([
messenger.any(HandleMessenger),
line.any(HandleLine),
slack.any(HandleSlack),
telegram.any(HandleTelegram),
viber.any(HandleViber),
whatsapp.any(HandleWhatsapp),
]);
}
// bottender.config.js
const { MemorySessionStore } = require('bottender');
module.exports = {
session: {
driver: 'memory2',
stores: {
memory2: new MemorySessionStore();
},
},
};
Support event.isReaction
& event.react
:
function App(context) {
if (context.event.isReaction) {
console.log(context.event.reaction);
// {
// reaction: 'smile',
// emoji: '\u{2764}\u{FE0F}',
// action: 'react',
// mid: 'mid.$cAAE1UUyiiwthh0NPrVbVf4HFNDGl',
// }
}
}
Support detect events in routers:
const { router, messenger } = require('bottender/router');
function App() {
return router([
messenger.reaction.react(HandleReactionReact),
messenger.reaction.unreact(HandleReactionUnreact),
messenger.reaction(HandleReaction),
]);
}
async function HandleReactionReact(context) {}
async function HandleReactionUnreact(context) {}
async function HandleReaction(context) {}
context.sendOneTimeNotifReqTemplate
(#722):context.sendOneTimeNotifReqTemplate({
title: '<TITLE_TEXT>',
payload: '<USER_DEFINED_PAYLOAD>',
});
LineNotify
(#721):const { LineNotify } = require('bottender');
language
to User
(messaging-apis#563)sticon
to TextMessage
(messaging-apis#564)lib
es2018-es2020 by default.App
action accept Action as return value (#734)