@@ -371,6 +371,30 @@ class Message extends Base {
|
|||||||
} else {
|
} else {
|
||||||
this.interaction ??= null;
|
this.interaction ??= null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A call associated with a message
|
||||||
|
* @typedef {Object} MessageCall
|
||||||
|
* @property {Readonly<?Date>} endedAt The time the call ended
|
||||||
|
* @property {?number} endedTimestamp The timestamp the call ended
|
||||||
|
* @property {Snowflake[]} participants The ids of the users that participated in the call
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (data.call) {
|
||||||
|
/**
|
||||||
|
* The call associated with the message
|
||||||
|
* @type {?MessageCall}
|
||||||
|
*/
|
||||||
|
this.call = {
|
||||||
|
endedTimestamp: data.call.ended_timestamp ? Date.parse(data.call.ended_timestamp) : null,
|
||||||
|
participants: data.call.participants,
|
||||||
|
get endedAt() {
|
||||||
|
return this.endedTimestamp && new Date(this.endedTimestamp);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
this.call ??= null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
7
typings/index.d.ts
vendored
7
typings/index.d.ts
vendored
@@ -2065,6 +2065,7 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
|||||||
public readonly url: string;
|
public readonly url: string;
|
||||||
public webhookId: Snowflake | null;
|
public webhookId: Snowflake | null;
|
||||||
public poll: MessagePoll | null;
|
public poll: MessagePoll | null;
|
||||||
|
public call: MessageCall | null;
|
||||||
public flags: Readonly<MessageFlags>;
|
public flags: Readonly<MessageFlags>;
|
||||||
public reference: MessageReference | null;
|
public reference: MessageReference | null;
|
||||||
public position: number | null;
|
public position: number | null;
|
||||||
@@ -2536,6 +2537,12 @@ export class MessagePoll {
|
|||||||
public setDuration(duration: number): this;
|
public setDuration(duration: number): this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface MessageCall {
|
||||||
|
readonly endedAt: Date | null;
|
||||||
|
endedTimestamp: number | null;
|
||||||
|
participants: readonly Snowflake[];
|
||||||
|
}
|
||||||
|
|
||||||
export class ModalSubmitFieldsResolver {
|
export class ModalSubmitFieldsResolver {
|
||||||
constructor(components: PartialModalActionRow[]);
|
constructor(components: PartialModalActionRow[]);
|
||||||
private readonly _fields: PartialTextInputData[];
|
private readonly _fields: PartialTextInputData[];
|
||||||
|
|||||||
Reference in New Issue
Block a user