Skip to content

Commit

Permalink
fix(Message): update call to use naming scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
Snazzah committed Sep 10, 2024
1 parent 8772bec commit 7a5b728
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/structures/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -167,7 +172,7 @@ export interface MessageCall {
/** The participants of the call. */
participants: string[];
/** The time the call ended. */
ended_timestamp?: string;
endedTimestamp?: string;
}

/**
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7a5b728

Please sign in to comment.