28 lines
1.0 KiB
TypeScript
28 lines
1.0 KiB
TypeScript
import { Message, ImageMapMessage } from '@line/bot-sdk/lib/types';
|
|
/**
|
|
* the options to choose the way to send message in sendMessages method
|
|
* none: send a message to context
|
|
* ott: send messages to users bound to One-Time-Token (can send up to 10 ppl/group)
|
|
*/
|
|
export declare enum SendMessagesOptionsType {
|
|
none = "none",
|
|
ott = "ott"
|
|
}
|
|
declare type LiffMessage = Exclude<Message, ImageMapMessage>;
|
|
export declare type SendMessagesParams = LiffMessage[];
|
|
export interface SendMessagesOptions {
|
|
type: SendMessagesOptionsType;
|
|
token: string;
|
|
}
|
|
/**
|
|
* Sends messages on behalf of the user to the chat screen where the LIFF app is opened.
|
|
* If the LIFF app is opened on a screen other than the chat screen, messages cannot be sent.
|
|
* @export
|
|
* @param {Array<{type: string, text: string, }>} messages
|
|
* @returns {Promise<void>}
|
|
*/
|
|
export default function sendMessages(messages: SendMessagesParams,
|
|
/** DEPRECATED. options to support old specs. */
|
|
options?: SendMessagesOptions): Promise<void>;
|
|
export {};
|