Skip to content

Commit 7a5b728

Browse files
committed
fix(Message): update call to use naming scheme
1 parent 8772bec commit 7a5b728

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/structures/message.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ export class Message {
9595
this.mentionedEveryone = data.mention_everyone;
9696
this.tts = data.tts;
9797
this.pinned = data.pinned;
98+
if (data.call)
99+
this.call = {
100+
participants: data.call.participants,
101+
endedTimestamp: data.call.ended_timestamp
102+
};
98103
this.call = data.call;
99104
this.position = data.position;
100105
this.timestamp = Date.parse(data.timestamp);
@@ -167,7 +172,7 @@ export interface MessageCall {
167172
/** The participants of the call. */
168173
participants: string[];
169174
/** The time the call ended. */
170-
ended_timestamp?: string;
175+
endedTimestamp?: string;
171176
}
172177

173178
/**
@@ -360,7 +365,10 @@ export interface MessageData {
360365
pinned: boolean;
361366
mention_everyone: boolean;
362367
tts: boolean;
363-
call?: MessageCall;
368+
call?: {
369+
participants: string[];
370+
ended_timestamp?: string;
371+
};
364372
position?: number;
365373
thread?: CommandChannel;
366374
timestamp: string;

0 commit comments

Comments
 (0)