mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat(ThreadChannel): Backport creation timestamp (#7559)
This commit is contained in:
15
typings/index.d.ts
vendored
15
typings/index.d.ts
vendored
@@ -516,8 +516,8 @@ export type CategoryChannelResolvable = Snowflake | CategoryChannel;
|
||||
|
||||
export abstract class Channel extends Base {
|
||||
public constructor(client: Client, data?: RawChannelData, immediatePatch?: boolean);
|
||||
public readonly createdAt: Date;
|
||||
public readonly createdTimestamp: number;
|
||||
public readonly createdAt: Date | null;
|
||||
public readonly createdTimestamp: number | null;
|
||||
/** @deprecated This will be removed in the next major version, see https://github.com/discordjs/discord.js/issues/7091 */
|
||||
public deleted: boolean;
|
||||
public id: Snowflake;
|
||||
@@ -1042,7 +1042,8 @@ export abstract class GuildChannel extends Channel {
|
||||
public constructor(guild: Guild, data?: RawGuildChannelData, client?: Client, immediatePatch?: boolean);
|
||||
private memberPermissions(member: GuildMember, checkAdmin: boolean): Readonly<Permissions>;
|
||||
private rolePermissions(role: Role, checkAdmin: boolean): Readonly<Permissions>;
|
||||
|
||||
public readonly createdAt: Date;
|
||||
public readonly createdTimestamp: number;
|
||||
public readonly calculatedPosition: number;
|
||||
public readonly deletable: boolean;
|
||||
public guild: Guild;
|
||||
@@ -2305,6 +2306,9 @@ export class ThreadChannel extends TextBasedChannelMixin(Channel) {
|
||||
public archived: boolean | null;
|
||||
public readonly archivedAt: Date | null;
|
||||
public archiveTimestamp: number | null;
|
||||
public readonly createdAt: Date | null;
|
||||
private _createdTimestamp: number | null;
|
||||
public readonly createdTimestamp: number | null;
|
||||
public autoArchiveDuration: ThreadAutoArchiveDuration | null;
|
||||
public readonly editable: boolean;
|
||||
public guild: Guild;
|
||||
@@ -2328,6 +2332,11 @@ export class ThreadChannel extends TextBasedChannelMixin(Channel) {
|
||||
public rateLimitPerUser: number | null;
|
||||
public type: ThreadChannelTypes;
|
||||
public readonly unarchivable: boolean;
|
||||
public isPrivate(): this is this & {
|
||||
readonly createdTimestamp: number;
|
||||
readonly createdAt: Date;
|
||||
type: 'GUILD_PRIVATE_THREAD';
|
||||
};
|
||||
public delete(reason?: string): Promise<this>;
|
||||
public edit(data: ThreadEditData, reason?: string): Promise<ThreadChannel>;
|
||||
public join(): Promise<ThreadChannel>;
|
||||
|
||||
Reference in New Issue
Block a user