Releases: Yoctol/bottender
Releases · Yoctol/bottender
0.14.33 / 2018-04-13
0.14.32 / 2018-04-12
- [fix] MemoryCacheStore: make sure read as different object to prevent reading same key multiple times, causing freezed by other events.
0.14.31 / 2018-03-26
- [new] alias LINE ButtonsTemplate to ButtonTemplate to match type name
buttons
#219
Aliases:
- replyButtonsTemplate -> replyButtonTemplate
- pushButtonsTemplate -> pushButtonTemplate
- sendButtonsTemplate -> sendButtonTemplate
0.14.30 / 2018-03-22
- [new] Add cli option
-t
,--token
to overwrite token setting.
telegram
- [new] Add new Update APIs to
TelegramContext
:
editMessageText(text [, options])
editMessageCaption(caption [, options])
editMessageReplyMarkup(replyMarkup [, options])
deleteMessage(messageId)
editMessageLiveLocation(location [, options])
stopMessageLiveLocation(options)
forwardMessageFrom(fromChatId, messageId [, options])
forwardMessageTo(toChatId, messageId [, options])
0.14.29 / 2018-03-21
telegram
- [new] Add new Get APIs to
TelegramContext
:
context.getUserProfilePhotos({ limit: 1 }).then(result => {
console.log(result);
// {
// total_count: 3,
// photos: [
// [
// {
// file_id: 'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABHahi76pN-aO0UoDA050',
// file_size: 14650,
// width: 160,
// height: 160,
// },
// {
// file_id: 'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABKCfooqTgFUX0EoD5B1C',
// file_size: 39019,
// width: 320,
// height: 320,
// },
// {
// file_id: 'AgADBAADGTo4Gz8cZAeR-ouu4XBx78EeqRkABPL_pC9K3UpI0koD1B1C',
// file_size: 132470,
// width: 640,
// height: 640,
// },
// ],
// ],
// }
});
context.getChat().then(result => {
console.log(result);
// {
// id: 313534466,
// first_name: 'first',
// last_name: 'last',
// username: 'username',
// type: 'private',
// }
});
context.getChatAdministrators().then(result => {
console.log(result);
// [
// {
// user: {
// id: 313534466,
// first_name: 'first',
// last_name: 'last',
// username: 'username',
// languange_code: 'zh-TW',
// },
// status: 'creator',
// },
// ]
});
context.getChatMembersCount().then(result => {
console.log(result);
// '6'
});
context.getChatMember().then(result => {
console.log(result);
// {
// user: {
// id: 313534466,
// first_name: 'first',
// last_name: 'last',
// username: 'username',
// languange_code: 'zh-TW',
// },
// status: 'creator',
// }
});
0.14.28 / 2018-03-20
telegram
- [new] Add new Group APIs to
TelegramContext
:
context.kickChatMember
context.unbanChatMember
context.restrictChatMember
context.promoteChatMember
context.exportChatInviteLink
context.setChatPhoto
context.deleteChatPhoto
context.setChatTitle
context.setChatDescription
context.setChatStickerSet
context.deleteChatStickerSet
context.pinChatMessage
context.unpinChatMessage
context.leaveChat
- [new] Add new Payment APIs to
TelegramContext
:
0.14.27 / 2018-03-19
line
- [new] Add new
LineContext
methods:
context.getUserProfile().then(profile => {
console.log(profile);
// {
// displayName: 'LINE taro',
// userId: USER_ID,
// pictureUrl: 'http://obs.line-apps.com/...',
// statusMessage: 'Hello, LINE!',
// }
});
context.getMemberProfile(USER_ID).then(member => {
console.log(member);
// {
// "displayName":"LINE taro",
// "userId":"Uxxxxxxxxxxxxxx...",
// "pictureUrl":"http://obs.line-apps.com/..."
// }
});
context.getMemberIds(CURSOR).then(res => {
console.log(res);
// {
// memberIds: [
// 'Uxxxxxxxxxxxxxx...',
// 'Uxxxxxxxxxxxxxx...',
// 'Uxxxxxxxxxxxxxx...'
// ],
// next: 'jxEWCEEP...'
// }
});
context.getAllMemberIds().then(ids => {
console.log(ids);
// [
// 'Uxxxxxxxxxxxxxx..1',
// 'Uxxxxxxxxxxxxxx..2',
// 'Uxxxxxxxxxxxxxx..3',
// 'Uxxxxxxxxxxxxxx..4',
// 'Uxxxxxxxxxxxxxx..5',
// 'Uxxxxxxxxxxxxxx..6',
// ]
});
0.14.26 / 2018-03-17
messenger
- [new] Implement
context.getUserProfile
:
const user = await context.getUserProfile();
// {
// first_name: 'Kevin',
// last_name: 'Durant',
// profile_pic: 'https://example.com/pic.png',
// locale: 'en_US',
// timezone: 8,
// gender: 'male',
// };
- [new] Implement
context.sendSenderAction
:
context.sendSenderAction('typing_on');
// same as
context.typingOn();
- [fix] Fix metadata argument in handover methods (#208)
viber
- [new] Implement
context.getUserDetails
:
const user = await context.getUserDetails();
// {
// id: '01234567890A=',
// name: 'John McClane',
// avatar: 'http://avatar.example.com',
// country: 'UK',
// language: 'en',
// primary_device_os: 'android 7.1',
// api_version: 1,
// viber_version: '6.5.0',
// mcc: 1,
// mnc: 1,
// device_type: 'iPhone9,4',
// };
- [new] Implement
context.getOnlineStatus
:
const status = await context.getOnlineStatus();
// {
// id: '01234567890=',
// online_status: 0,
// online_status_message: 'online',
// }
0.14.25 / 2018-03-13
console
- [new] Support using
/exit
to exit
messenger
- [new] Support passing
verifyToken
toMessengerBot
orMessengerConnector
(#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)
0.14.24 / 2018-03-11
- [fix] Upgrade
@slack/client
deps to fix security vulnerability