Skip to content

Commit

Permalink
fixed sendMediaGroup method
Browse files Browse the repository at this point in the history
  • Loading branch information
naseif committed Mar 2, 2022
1 parent 3386af3 commit 6109f5c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/structure/TelegramAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -887,13 +887,13 @@ export class TelegramAPI {
if (options) {
params = {
chat_id: chat_id,
media: media,
media: JSON.stringify(media),
...options,
};
} else {
params = {
chat_id: chat_id,
media: media,
media: JSON.stringify(media),
};
}

Expand All @@ -908,6 +908,8 @@ export class TelegramAPI {
postOptions
);

if (!send) throw new Error(`API CALL FAILED`);

return send;
}

Expand Down

0 comments on commit 6109f5c

Please sign in to comment.