Skip to content

Releases: Yoctol/bottender

0.14.13 / 2018-01-03

03 Jan 11:08
Compare
Choose a tag to compare

messenger

  • [new] Add optional --yes for Messenger force upload attachment #127
  • [new] Initial State in test-utils #126
  • [fix] Improve context simulator and add some tests #131
  • [fix] Support Messenger webhook test requests #139

0.14.12 / 2017-12-25

25 Dec 09:45
Compare
Choose a tag to compare

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

20 Dec 08:16
Compare
Choose a tag to compare
  • [fix] ContextSimulator: sendState to setState #108
  • [deprecated] sendXXXWithDelay is deprecated. Use sendXXX with options.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 using messaging-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

14 Dec 10:43
Compare
Choose a tag to compare

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

  • [new] Add Slack signature validation #94
  • [improve] Let slack connector handle promises parallelly #105

0.14.9 / 2017-12-06

06 Dec 10:15
Compare
Choose a tag to compare
  • [new] Add referral getters for MessengerEvent:
event.isReferral // true or false
event.referral // { source: 'SHORTLINK', type: 'OPEN_THREAD', ref: 'my_ref' }
event.ref // 'my_ref'
  • [fix] bottender init bug introduced by #81. Issue: #86

0.14.8 / 2017-12-05

05 Dec 09:28
Compare
Choose a tag to compare
  • [new] Create README.md and .gitignore when bottender 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

30 Nov 08:27
b35b4f3
Compare
Choose a tag to compare

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 and context.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

27 Nov 10:17
Compare
Choose a tag to compare

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 to bottender 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

21 Nov 10:23
Compare
Choose a tag to compare

messenger

  • [new] Add --skip-validate cli option to skip Joi 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

15 Nov 06:45
Compare
Choose a tag to compare

line

  • [new] Implement richmenu api methods on context #23
    • context.getLinkedRichMenu()
    • context.linkRichMenu(richMenuId)
    • context.unlinkRichMenu()