Skip to content

Commit 00cbb5a

Browse files
authored
Add Emojis in text messages (#295)
* Add emojis to TextMessage * Fix code format
1 parent 89bf53d commit 00cbb5a

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

lib/client.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,7 @@ export default class Client {
292292
return ensureJSON(res);
293293
}
294294

295-
public async getRichMenuAlias(
296-
richMenuAliasId: string,
297-
): Promise<any> {
295+
public async getRichMenuAlias(richMenuAliasId: string): Promise<any> {
298296
const res = await this.http.get<any>(
299297
`${MESSAGING_API_PREFIX}/richmenu/alias/${richMenuAliasId}`,
300298
);

lib/types.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,13 +577,25 @@ export type TextMessage = MessageCommon & {
577577
/**
578578
* Message text. You can include the following emoji:
579579
*
580+
* - LINE emojis. Use a $ character as a placeholder and specify the product ID and emoji ID of the LINE emoji you want to use in the emojis property.
580581
* - Unicode emoji
581-
* - LINE original emoji
582+
* - (Deprecated) LINE original unicode emojis
582583
* ([Unicode codepoint table for LINE original emoji](https://developers.line.biz/media/messaging-api/emoji-list.pdf))
583584
*
584-
* Max: 2000 characters
585+
* Max: 5000 characters
585586
*/
586587
text: string;
588+
589+
/**
590+
* One or more LINE emoji.
591+
*
592+
* Max: 20 LINE emoji
593+
*/
594+
emojis?: {
595+
index: number;
596+
productId: string;
597+
emojiId: string;
598+
}[];
587599
};
588600

589601
/**
@@ -2088,7 +2100,7 @@ export type Size = {
20882100
* When a control associated with this action is tapped, the URI specified in
20892101
* the `uri` property is opened.
20902102
*/
2091-
export type RichMenuSwitchAction = {
2103+
export type RichMenuSwitchAction = {
20922104
type: "richmenuswitch";
20932105
/**
20942106
* Action label. Optional for rich menus. Read when the user's device accessibility feature is enabled.
@@ -2103,7 +2115,7 @@ export type Size = {
21032115
* String returned by the postback.data property of the postback event via a webhook
21042116
* Max character limit: 300
21052117
*/
2106-
data: string;
2118+
data: string;
21072119
};
21082120

21092121
/**

0 commit comments

Comments
 (0)