Skip to content

Commit

Permalink
1.4.11 changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
chentsulin committed Jul 29, 2020
1 parent 5d2fedd commit b2cd393
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.4.11 / 2020-07-29

## dialogflow

- [fix] use for await instead of `promise.all` #851

# 1.4.10 / 2020-07-24

- [fix] add Interaction type for route `slack.event` (#842)
Expand Down Expand Up @@ -1230,7 +1236,7 @@ const bot = new ConsoleBot({
});

bot.connector.platform; // 'messenger'
bot.onEvent((context) => {
bot.onEvent(context => {
context.platform; // 'messenger'
});
```
Expand Down Expand Up @@ -1513,7 +1519,7 @@ Aliases:
* [`context.getUserProfilePhotos`](https://bottender.js.org/docs/APIReference-TelegramContext#code-classlanguage-textgetuserprofilephotosoptionscode---official-docs)
```js
context.getUserProfilePhotos({ limit: 1 }).then((result) => {
context.getUserProfilePhotos({ limit: 1 }).then(result => {
console.log(result);
// {
// total_count: 3,
Expand Down Expand Up @@ -1546,7 +1552,7 @@ context.getUserProfilePhotos({ limit: 1 }).then((result) => {
- [`context.getChat`](https://bottender.js.org/docs/APIReference-TelegramContext#code-classlanguage-textgetchatcode---official-docs)
```js
context.getChat().then((result) => {
context.getChat().then(result => {
console.log(result);
// {
// id: 313534466,
Expand All @@ -1561,7 +1567,7 @@ context.getChat().then((result) => {
- [`context.getChatAdministrators`](https://bottender.js.org/docs/APIReference-TelegramContext#code-classlanguage-textgetchatadministratorscode---official-docs)
```js
context.getChatAdministrators().then((result) => {
context.getChatAdministrators().then(result => {
console.log(result);
// [
// {
Expand All @@ -1581,7 +1587,7 @@ context.getChatAdministrators().then((result) => {
- [`context.getChatMembersCount`](https://bottender.js.org/docs/APIReference-TelegramContext#code-classlanguage-textgetchatmemberscountcode---official-docs)
```js
context.getChatMembersCount().then((result) => {
context.getChatMembersCount().then(result => {
console.log(result);
// '6'
});
Expand All @@ -1590,7 +1596,7 @@ context.getChatMembersCount().then((result) => {
- [`context.getChatMember`](https://bottender.js.org/docs/APIReference-TelegramContext#code-classlanguage-textgetchatmemberuseridcode---official-docs)
```js
context.getChatMember().then((result) => {
context.getChatMember().then(result => {
console.log(result);
// {
// user: {
Expand Down Expand Up @@ -1640,7 +1646,7 @@ context.getChatMember().then((result) => {
* [`context.getUserProfile`](https://bottender.js.org/docs/APIReference-LineContext#getuserprofile):
```js
context.getUserProfile().then((profile) => {
context.getUserProfile().then(profile => {
console.log(profile);
// {
// displayName: 'LINE taro',
Expand All @@ -1654,7 +1660,7 @@ context.getUserProfile().then((profile) => {
- [`context.getMemberProfile`](https://bottender.js.org/docs/APIReference-LineContext#getmemberprofileuserid):
```js
context.getMemberProfile(USER_ID).then((member) => {
context.getMemberProfile(USER_ID).then(member => {
console.log(member);
// {
// "displayName":"LINE taro",
Expand All @@ -1667,7 +1673,7 @@ context.getMemberProfile(USER_ID).then((member) => {
- [`context.getMemberIds`](https://bottender.js.org/docs/APIReference-LineContext#getmemberidsstart):
```js
context.getMemberIds(CURSOR).then((res) => {
context.getMemberIds(CURSOR).then(res => {
console.log(res);
// {
// memberIds: [
Expand All @@ -1683,7 +1689,7 @@ context.getMemberIds(CURSOR).then((res) => {
- [`context.getAllMemberIds`](https://bottender.js.org/docs/APIReference-LineContext#getallmemberids):
```js
context.getAllMemberIds().then((ids) => {
context.getAllMemberIds().then(ids => {
console.log(ids);
// [
// 'Uxxxxxxxxxxxxxx..1',
Expand Down Expand Up @@ -1852,7 +1858,7 @@ context.event.payload; // PAYLOAD
```js
const bot = new ConsoleBot({ fallbackMethods: true });

bot.onEvent(async (context) => {
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?', [
Expand Down Expand Up @@ -1946,7 +1952,7 @@ const bot = new SlackBot({
accessToken: '__FILL_YOUR_TOKEN_HERE__',
});

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

Expand Down Expand Up @@ -2038,7 +2044,7 @@ const bot = new TelegramBot({
accessToken: '__FILL_YOUR_TOKEN_HERE__',
});

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

Expand Down Expand Up @@ -2101,7 +2107,7 @@ Game API:
```js
context.sendGame('Mario Bros.');
context.setGameScore(999);
context.getGameHighScores().then((result) => {
context.getGameHighScores().then(result => {
console.log(result);
/*
{
Expand Down Expand Up @@ -2136,7 +2142,7 @@ const bot = new ViberBot({
accessToken: '__FILL_YOUR_TOKEN_HERE__',
});

bot.onEvent(async (context) => {
bot.onEvent(async context => {
if (context.event.isMessage) {
await context.sendText('Hello World');
}
Expand Down Expand Up @@ -2206,7 +2212,7 @@ event.ref; // 'my_ref'
```js
new MessengerBot({
appSecret: '__FILL_YOUR_SECRET_HERE__',
mapPageToAccessToken: (pageId) => accessToken,
mapPageToAccessToken: pageId => accessToken,
});
```
Expand Down

0 comments on commit b2cd393

Please sign in to comment.