Releases: Yoctol/bottender
Releases · Yoctol/bottender
1.3.4 / 2020-04-04
- [fix] fix
bottender/router
import statement in TypeScript (#715)
1.3.3 / 2020-04-01
line
- [deps] update
messaging-api-line
for domain name change for certain endpoints.
1.3.2 / 2020-03-20
1.3.1 / 2020-03-16
- [deps] some packages bump from dependabot.
line
- [deps] update
messaging-api-line
to fix an issue about narrowcast.
create-bottender-app
- [fix] hint users to edit the
.env
file (#678)
1.3.0 / 2020-03-06
- [type] export types from messaging-apis (#661):
import {
MessengerTypes,
WhatsappTypes,
LineTypes,
TelegramTypes,
SlackTypes,
ViberTypes,
} from 'bottender';
- [deps] update dependencies.
- [new] add new channel
whatsapp
built on top of Twilio API for WhatsApp (#664):
// bottender.config.js
module.exports = {
channels: {
whatsapp: {
enabled: true,
path: '/webhooks/whatsapp',
accountSid: process.env.WHATSAPP_ACCOUNT_SID,
authToken: process.env.WHATSAPP_AUTH_TOKEN,
phoneNumber: process.env.WHATSAPP_PHONE_NUMBER,
},
},
};
slack
- [new] support Slack signing secret:
// bottender.config.js
module.exports = {
channels: {
slack: {
enabled: true,
path: '/webhooks/slack',
accessToken: process.env.SLACK_ACCESS_TOKEN,
signingSecret: process.env.SLACK_SIGNING_SECRET,
// verificationToken: process.env.SLACK_VERIFICATION_TOKEN, // deprecated, use signingSecret
},
},
};
- [new] add support for Slack slash commands (#166):
async function App(context) {
if (context.event.isCommand) {
await context.sendText(
`I received slash command '${context.event.command}' with arguments: '${context.event.text}'`
);
}
}
line
- [deps] update
messaging-api-line
to support narrowcast.
create-bottender-app
- [new] use signing secret in create-bottender-app (#659).
- [new] add TypeScript support to
bottender dev
(#654).
cli
- [new] support
bottender dev --inspect=HOST:PORT
(#656).
1.2.3 / 2020-03-04
slack
- [fix] fix a typo in Slack error message #671
1.2.2 / 2020-02-24
create-bottender-app
- [fix] Fixed wrong npm scripts in the instruction.
1.2.1 / 2020-02-13
- [fix] install @types packages in package dependencies instead of workspace.
1.2.0 / 2020-01-22
-
[new] Added four NLU packages:
-
[new] Added
context.setIntent()
for intent tracking purpose (#617):
context.intent; // null
context.setIntent('greeting');
context.intent; // 'greeting'
- [new] Added
context.setAsHandled()
andcontext.setAsNotHandled()
for tracking handling status (#624):
context.setAsHandled();
context.isHandled; // true
context.setAsNotHandled();
context.isHandled; // false
- [new] Added
getSessionStore
helper function to get the session store that configured bybottender.config.js
(#633):
const { getSessionStore } = require('bottender');
const sessionStore = getSessionStore();
- [new] Added
getClient
helper function to access underlying messaging client configured bybottender.config.js
(#634):
const { getClient } = require('bottender');
const messenger = getClient('messenger');
messenger.sendText(USER_ID, 'Hello!', { tag: 'CONFIRMED_EVENT_UPDATE' });
const line = getClient('line');
line.pushText(USER_ID, 'Hello!');
- [new] Added async plugin support.
- [docs] Updated Natural Language Understanding Guide to use NLU packages.
- [example] Using NLU packages in NLU examples.
slack
- [new] add
includeBotMessages
option for interacting withbot_message
(#635):
// bottender.config.js
module.exports = {
// ...
slack: {
enabled: true,
path: '/webhooks/slack',
accessToken: process.env.SLACK_ACCESS_TOKEN,
verificationToken: process.env.SLACK_VERIFICATION_TOKEN,
includeBotMessages: true, // add this line
},
};
Then you can use context.event.isBotMessage
to determine if the event is a bot message event:
module.exports = function App(context) {
if (context.event.isBotMessage) {
console.log(context.event.rawEvent.botId);
}
};
1.0.8 / 2020-01-08
- [fix] fix(Bot, LineConnector, MessengerConnector): when receiving multiple events, construct session with event instead of request #621