Releases: Yoctol/bottender
Releases · Yoctol/bottender
0.14.13 / 2018-01-03
0.14.12 / 2017-12-25
telegram
- [new] Support running Telegram bots with long polling #117
const { TelegramBot } = require('bottender');
const bot = new TelegramBot({
accessToken: '__FILL_YOUR_TOKEN_HERE__',
});
bot.onEvent(async context => {
await context.sendText('Hello World');
});
bot.createLongPollingRuntime({
limit: 100,
timeout: 60,
allowed_updates: ['message', 'callback_query'],
});
See more details in examples/telegram-long-polling
- [fix] Result destructing bugs in Telegram webhook commands
0.14.11 / 2017-12-20
- [fix] ContextSimulator: sendState to setState #108
- [deprecated]
sendXXXWithDelay
is deprecated. UsesendXXX
withoptions.delay
instead.
messenger
- [fix] update messaging-api-messenger to fix empty array quick_replies bug
line
- [new] Add LINE
context.leave()
function for group and room #107
telegram
- [fix] Fix
context.sendVideoNote
usingmessaging-api-telegram
v0.6.5 - [new] Add context.methods:
sendMediaGroup:
context.sendMediaGroup([
{ type: 'photo', media: 'BQADBAADApYAAgcZZAfj2-xeidueWwI' },
]);
Payment API:
context.sendInvoice({
title: 'product name',
description: 'product description',
payload: 'bot-defined invoice payload',
provider_token: 'PROVIDER_TOKEN',
start_parameter: 'pay',
currency: 'USD',
prices: [
{ label: 'product', amount: 11000 },
{ label: 'tax', amount: 11000 },
],
});
Game API:
context.sendGame('Mario Bros.');
context.setGameScore(999);
context.getGameHighScores().then(result => {
console.log(result);
/*
{
ok: true,
result: [
{
position: 1,
user: {
id: 427770117,
is_bot: false,
first_name: 'first',
},
score: 999,
},
],
};
*/
});
0.14.10 / 2017-12-14
Introducing Viber Support to Bottender!
const { ViberBot } = require('bottender');
const { createServer } = require('bottender/express');
const bot = new ViberBot({
accessToken: '__FILL_YOUR_TOKEN_HERE__',
});
bot.onEvent(async context => {
if (context.event.isMessage) {
await context.sendText('Hello World');
}
});
const server = createServer(bot);
server.listen(5000, () => {
console.log('server is running on 5000 port...');
});
See viber-hello-world for more details.
- [new] Add
update-notifier
in CLI #99 - [deps] Update messaging API clients to
v0.6.x
.
messenger
- [fix] Fix domain whitelisting usage
- [fix] Check messenger menu item length #71
line
- [fix] Handle LINE webhook verify request in LineConnector #100
slack
0.14.9 / 2017-12-06
0.14.8 / 2017-12-05
- [new] Create
README.md
and.gitignore
whenbottender init
- [deps] Update messaging-apis to
v0.5.16
messenger
- [new] Add
event.isFromCustomerChatPlugin
getter - [new] Implement CLI attachment force upload #70
- [fix] Fix CLI profile bug
- [fix] Add huge like sticker support to isLikeSticker #67
- [fix] Use timingSafeEqual to validate signature #79
line
- [fix] Use timingSafeEqual to validate signature #79
0.14.7 / 2017-11-30
messenger
- [new] Add
mapPageToAccessToken
to support multiple pages (Experimental) #47
new MessengerBot({
appSecret: '__FILL_YOUR_SECRET_HERE__',
mapPageToAccessToken: (pageId) => accessToken,
});
Note: API may changes between any versions.
line
- [new] Export
context.reply
andcontext.push
methods. #52 - [new] New CLI commands to sync LINE rich menus: #50
$ bottender line menu get
$ bottender line menu set
$ bottender line menu delete
slack
- [new] Add support to interactive messages, and you can get action from it: #41
if (context.event.isInteractiveMessage) {
console.log(context.event.action);
}
0.14.6 / 2017-11-27
messenger
- [new] A new command to upload your messenger attachments from
/assets
directory (in beta):
$ bottender messenger attachment upload
Then, you can import them with getAttachment
util function:
const { getAttachment } = require('bottender/utils');
console.log(getAttachment('mypic.jpg').id); // '1591074914293017'
- [new] Add
--force
option tobottender messenger profile set
(delete all and set all) - [fix] Fix file export for
test-utils.js
#44 - [fix] Refined affected methods in
withTyping
#35
slack
- [fix] Stop passing
as_user: true
#33
0.14.5 / 2017-11-21
messenger
- [new] Add
--skip-validate
cli option to skipJoi
schema validation #31 - [fix] Allow unknow keys in config and fix schema rules #29
slack
- [new] Add options for
postMessage
#25
You can use it to send additional attachments, like below:
context.postMessage('I am a test message', {
attachments: [
{
text: "And here's an attachment!"
},
],
});
See official docs for more available options.
0.14.4 / 2017-11-15
line
- [new] Implement richmenu api methods on context #23
context.getLinkedRichMenu()
context.linkRichMenu(richMenuId)
context.unlinkRichMenu()