import { ChatAction, ExtraEditMessage, ExtraMediaGroup, ExtraPhoto, Message } from 'telegraf/typings/telegram-types'; /** * The reply message settings. * * @export * @interface IReplyMessage */ export interface IReplyMessage { /** * The message to send to the user. * * @type {TMessage} * @memberof IReplyMessage */ message: TMessage; /** * The extra of the message which will be sent to the user. * * @type {TExtra} * @memberof IReplyMessage */ extra?: TExtra; /** * Indicates whether the last message sent by the bot should be edited or * the message itself to be edited, or the ID of the message to edit. * * @type {(true | Message | number)} * @memberof IReplyMessage */ edit?: true | Message | number; } export interface ISetActionMessage { /** * The action to update the Telegram chat status. * * @type {ChatAction} * @memberof ISetActionMessage */ action: ChatAction; /** * Indicates whether the generator should wait for 5 seconds or not. * * @type {boolean} * @memberof ISetActionMessage */ wait?: boolean; } export interface IImageReplyMessage extends IReplyMessage<{ source: string | string[] | ({ source: string; caption?: string; }[]) | ([string, string][]); caption?: string; }, ExtraPhoto | ExtraMediaGroup> { } export declare function isImageReplyMessage(obj: any): obj is IImageReplyMessage; /** * Creates an image response with given source. * The source may be a local file path too. * * If the source starts with `~/`, then the image will be searched in `cwd()`. * * @export * @param {string} source The source of the image. * @param {string} [caption] The caption of the image. * @param {ExtraPhoto} [extra] The Extras. * @returns {IImageReplyMessage} Image response. */ export declare function makeImageObject(source: string, caption?: string, extra?: ExtraPhoto): IImageReplyMessage; /** * Creates a gallery from given sources. * The sources should be a valid URL starting with `http://` or `https://`. * * If the given links are more than 10, then the images will be split * at 10 and will be sent as different media groups. * * @export * @param {string[]} sources The array of sources to send. * @param {ExtraMediaGroup} [extra] The Extras. * @returns {IImageReplyMessage} Gallery response. */ export declare function makeImageObject(sources: string[], extra?: ExtraMediaGroup): IImageReplyMessage; /** * Creates an image response from given source object. * The source may be a local file path too. * * If the source starts with `~/`, then the image will be searched in `cwd()`. * * @export * @param {{ source: string, caption?: string }} source The source object of the image. * @param {ExtraPhoto} [extra] The Extras. * @returns {IImageReplyMessage} Image response. */ export declare function makeImageObject(source: { source: string; caption?: string; }, extra?: ExtraPhoto): IImageReplyMessage; /** * Creates a gallery response from given source objects array. * The sources should be valid URLs starting with `http://` or `https://`. * * If the given links are more than 10, then the images will be split * at 10 and will be sent as different media groups. * * @export * @param {{ source: string, caption?: string }[]} source The source objects array. * @param {ExtraMediaGroup} [extra] The Extras. * @returns {IImageReplyMessage} Gallery response. */ export declare function makeImageObject(source: { source: string; caption?: string; }[], extra?: ExtraMediaGroup): IImageReplyMessage; /** * Creates a gallery response from given `[source, description]` pair array. * The sources should be valid URLs starting with `http://` or `https://`. * * If the given links are more then 10, then the images will be split * at 10 and will be sent as different media groups. * * @export * @param {string[][]} source The source-description array array. * @param {ExtraMediaGroup} [extra] The Extras. * @returns {IImageReplyMessage} Gallery response. */ export declare function makeImageObject(source: string[][], extra?: ExtraMediaGroup): IImageReplyMessage; /** * Creates a chat-action update message. * * @export * @param {ChatAction} to New chat action to show for 5 seconds. * @param {boolean} [wait=false] Indicates whether the `yield` should * wait for 5 seconds. * @returns {ISetActionMessage} SetActionMessage */ export declare function makeUpdateActionObject(to: ChatAction, wait?: boolean): ISetActionMessage; /** * Creates a chat-action update message. * * @export * @param {ChatAction} to New chat action to show for 5 seconds. * @param {boolean} [wait=false] Indicates whether the `yield` should * wait for 5 seconds. * @returns {ISetActionMessage} SetActionMessage */ export declare function makeUpdateStatusObject(to: ChatAction, wait?: boolean): ISetActionMessage; export declare function isSetActionMessage(obj: any): obj is ISetActionMessage; export declare function isReplyMessage(obj: any): obj is IReplyMessage;