From 7a5b728a308c6093ee857bbf5c63a8dcbf67c1d8 Mon Sep 17 00:00:00 2001 From: Snazzah Date: Tue, 10 Sep 2024 18:08:21 -0500 Subject: [PATCH] fix(Message): update `call` to use naming scheme --- src/structures/message.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/structures/message.ts b/src/structures/message.ts index ba9b56e3..f9351553 100644 --- a/src/structures/message.ts +++ b/src/structures/message.ts @@ -95,6 +95,11 @@ export class Message { this.mentionedEveryone = data.mention_everyone; this.tts = data.tts; this.pinned = data.pinned; + if (data.call) + this.call = { + participants: data.call.participants, + endedTimestamp: data.call.ended_timestamp + }; this.call = data.call; this.position = data.position; this.timestamp = Date.parse(data.timestamp); @@ -167,7 +172,7 @@ export interface MessageCall { /** The participants of the call. */ participants: string[]; /** The time the call ended. */ - ended_timestamp?: string; + endedTimestamp?: string; } /** @@ -360,7 +365,10 @@ export interface MessageData { pinned: boolean; mention_everyone: boolean; tts: boolean; - call?: MessageCall; + call?: { + participants: string[]; + ended_timestamp?: string; + }; position?: number; thread?: CommandChannel; timestamp: string;