Skip to content

Commit fbc0b81

Browse files
committed
chore: lint
1 parent 1073184 commit fbc0b81

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

src/client.ts

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,12 @@ export class Client<
355355
* @param filename - Filename
356356
* @param options - Optional: caption and replyToId
357357
*/
358-
async sendImage(threadId: bigint, data: Buffer, filename: string, options?: string | { caption?: string; replyToId?: string }): Promise<SendMessageResult> {
358+
async sendImage(
359+
threadId: bigint,
360+
data: Buffer,
361+
filename: string,
362+
options?: string | { caption?: string; replyToId?: string },
363+
): Promise<SendMessageResult> {
359364
if (!this.handle) throw new Error("Not connected");
360365
const opts = typeof options === "string" ? { caption: options } : options;
361366
return native.sendImage(this.handle, {
@@ -375,7 +380,12 @@ export class Client<
375380
* @param filename - Filename
376381
* @param options - Optional: caption and replyToId
377382
*/
378-
async sendVideo(threadId: bigint, data: Buffer, filename: string, options?: string | { caption?: string; replyToId?: string }): Promise<SendMessageResult> {
383+
async sendVideo(
384+
threadId: bigint,
385+
data: Buffer,
386+
filename: string,
387+
options?: string | { caption?: string; replyToId?: string },
388+
): Promise<SendMessageResult> {
379389
if (!this.handle) throw new Error("Not connected");
380390
const opts = typeof options === "string" ? { caption: options } : options;
381391
return native.sendVideo(this.handle, {
@@ -395,7 +405,12 @@ export class Client<
395405
* @param filename - Filename
396406
* @param options - Optional: replyToId
397407
*/
398-
async sendVoice(threadId: bigint, data: Buffer, filename: string, options?: { replyToId?: string }): Promise<SendMessageResult> {
408+
async sendVoice(
409+
threadId: bigint,
410+
data: Buffer,
411+
filename: string,
412+
options?: { replyToId?: string },
413+
): Promise<SendMessageResult> {
399414
if (!this.handle) throw new Error("Not connected");
400415
return native.sendVoice(this.handle, {
401416
threadId,
@@ -440,7 +455,11 @@ export class Client<
440455
* @param stickerId - Sticker ID
441456
* @param options - Optional: replyToId
442457
*/
443-
async sendSticker(threadId: bigint, stickerId: bigint, options?: { replyToId?: string }): Promise<SendMessageResult> {
458+
async sendSticker(
459+
threadId: bigint,
460+
stickerId: bigint,
461+
options?: { replyToId?: string },
462+
): Promise<SendMessageResult> {
444463
if (!this.handle) throw new Error("Not connected");
445464
return native.sendSticker(this.handle, { threadId, stickerId, replyToId: options?.replyToId });
446465
}

src/native.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,15 @@ export const native = {
191191
},
192192
) => callAsync<{ fbId: bigint; filename: string }>("MxUploadMedia", { handle, options }),
193193

194-
sendImage: (handle: number, options: { threadId: bigint; data: number[]; filename: string; caption?: string; replyToId?: string }) =>
195-
callAsync<{ messageId: string; timestampMs: bigint }>("MxSendImage", { handle, options }),
194+
sendImage: (
195+
handle: number,
196+
options: { threadId: bigint; data: number[]; filename: string; caption?: string; replyToId?: string },
197+
) => callAsync<{ messageId: string; timestampMs: bigint }>("MxSendImage", { handle, options }),
196198

197-
sendVideo: (handle: number, options: { threadId: bigint; data: number[]; filename: string; caption?: string; replyToId?: string }) =>
198-
callAsync<{ messageId: string; timestampMs: bigint }>("MxSendVideo", { handle, options }),
199+
sendVideo: (
200+
handle: number,
201+
options: { threadId: bigint; data: number[]; filename: string; caption?: string; replyToId?: string },
202+
) => callAsync<{ messageId: string; timestampMs: bigint }>("MxSendVideo", { handle, options }),
199203

200204
sendVoice: (handle: number, options: { threadId: bigint; data: number[]; filename: string; replyToId?: string }) =>
201205
callAsync<{ messageId: string; timestampMs: bigint }>("MxSendVoice", { handle, options }),

0 commit comments

Comments
 (0)