Skip to content

Commit

Permalink
Added sendMediaGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
eioo committed May 27, 2018
1 parent 86fa899 commit 8edf58d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions types/node-telegram-bot-api/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ declare namespace TelegramBot {
caption?: string;
}

interface SendMediaGroupOptions {
disable_notification?: boolean;
reply_to_message_id?: number;
}

type SendStickerOptions = SendBasicOptions;

interface SendVideoOptions extends SendBasicOptions {
Expand Down Expand Up @@ -355,6 +360,17 @@ declare namespace TelegramBot {
mime_type?: string;
}

interface InputMediaPhoto {
type: string;
media: string;
fileOptions?: {
filename: string;
contentType: string;
}
}

type InputMediaVideo = InputMediaPhoto;

interface VideoNote extends FileBase {
length: number;
duration: number;
Expand Down Expand Up @@ -835,6 +851,8 @@ declare class TelegramBot extends EventEmitter {

sendDocument(chatId: number | string, doc: string | Stream | Buffer, options?: TelegramBot.SendDocumentOptions, fileOpts?: any): Promise<TelegramBot.Message | Error>;

sendMediaGroup(chatId: number | string, media: Array<TelegramBot.InputMediaPhoto | TelegramBot.InputMediaVideo>, options?: TelegramBot.SendMediaGroupOptions): Promise<TelegramBot.Message | Error>;

sendSticker(chatId: number | string, sticker: string | Stream | Buffer, options?: TelegramBot.SendStickerOptions): Promise<TelegramBot.Message | Error>;

sendVideo(chatId: number | string, video: string | Stream | Buffer, options?: TelegramBot.SendVideoOptions): Promise<TelegramBot.Message | Error>;
Expand Down

0 comments on commit 8edf58d

Please sign in to comment.