Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bottender

Package Overview
Dependencies
Maintainers
6
Versions
215
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bottender - npm Package Versions

1
22

0.14.25

Diff

Changelog

Source

0.14.25 / 2018-03-13

console

  • [new] Support using /exit to exit

messenger

  • [new] Support passing verifyToken to MessengerBot or MessengerConnector (#204)

Support both:

  • pass verifyToken in server config
const bot = new MessengerBot({
  accessToken: config.accessToken,
  appSecret: config.appSecret,
});

const server = createServer(bot, { verifyToken: config.verifyToken });
  • pass verifyToken in bot config
const bot = new MessengerBot({
  accessToken: config.accessToken,
  appSecret: config.appSecret,
  verifyToken: config.verifyToken,
});

const server = createServer(bot);

line

  • [fix] Fix LINE join, leave events which do not have userId will fail get profile (#206)
chentsulin
published 0.14.24 •

Changelog

Source

0.14.24 / 2018-03-11

  • [fix] Upgrade @slack/client deps to fix security vulnerability
chentsulin
published 0.14.23 •

Changelog

Source

0.14.23 / 2018-02-27

  • [fix] fix context simulator initialState (#198)

messenger

  • [new] Support request thread control:
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',
  }
*/
  • [fix] fix error on verifying facebook signature.
chentsulin
published 0.14.22 •

Changelog

Source

0.14.22 / 2018-02-12

  • [deps] bump messaging-apis to v0.6.13

console

  • [new] Support trigger payload in 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
chentsulin
published 0.14.21 •

Changelog

Source

0.14.21 / 2018-02-05

  • [new] Support all of methods on 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"}]]
  • [fix] Catch write session error in async mode #185
  • [improve] Show warning when calling setState or resetState after session have been written #186
chentsulin
published 0.14.20 •

Changelog

Source

0.14.20 / 2018-01-30

  • [fix] Use sync mode in ConsoleBot to fix some format issue.
chentsulin
published 0.14.19 •

Changelog

Source

0.14.19 / 2018-01-25

  • [new] Support --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
  • [deps] Update part of dependencies.

viber

  • [new] Implement signature verify for viber
chentsulin
published 0.14.18 •

Changelog

Source

0.14.18 / 2018-01-18

  • [fix] Prevent applying any mutations to initialState #164

telegram

  • [new] Added context.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,
  }
);
chentsulin
published 0.14.17 •

Changelog

Source

0.14.17 / 2018-01-17

  • [changed] Improve config schema validation.

slack

  • [experimental] add Slack RTM API support:
const { SlackBot } = require('bottender');

const bot = new SlackBot({
  accessToken: '__FILL_YOUR_TOKEN_HERE__',
});

bot.onEvent(async (context) => {
  await context.sendText('Hello World');
});

bot.createRtmRuntime();

telegram

  • [new] Handle all of telegram event types includes:
    • message
    • edited_message
    • channel_post
    • edited_channel_post
    • inline_query
    • chosen_inline_result
    • callback_query
    • shipping_query
    • pre_checkout_query
  • [new] Support group chat events.
kpman
published 0.14.16 •

Changelog

Source

0.14.16 / 2018-01-16

messenger

  • [new] Better handle Messenger getUserProfile failure #155

If getUserProfile throw error, session.user will fallback to have only id and _updatedAt keys.

telegram

  • [new] Added more event parser and getter to telegram event #150
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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc