@discordjs/structures 0.2.0-move-client-init.1761650119-a4c0a246f → 0.2.0-pr-11006.1765450224-e636950b2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/bitfields/BitField.ts","../src/bitfields/ChannelFlagsBitField.ts","../src/bitfields/PermissionsBitField.ts","../src/utils/symbols.ts","../src/channels/mixins/AppliedTagsMixin.ts","../src/channels/mixins/ChannelOwnerMixin.ts","../src/channels/mixins/GuildChannelMixin.ts","../src/channels/mixins/ChannelParentMixin.ts","../src/channels/mixins/ChannelPermissionMixin.ts","../src/channels/mixins/ChannelPinMixin.ts","../src/channels/mixins/TextChannelMixin.ts","../src/channels/mixins/ChannelSlowmodeMixin.ts","../src/channels/mixins/ChannelWebhookMixin.ts","../src/channels/mixins/ChannelTopicMixin.ts","../src/channels/mixins/DMChannelMixin.ts","../src/channels/mixins/GroupDMMixin.ts","../src/channels/mixins/ThreadChannelMixin.ts","../src/channels/mixins/ThreadOnlyChannelMixin.ts","../src/channels/mixins/VoiceChannelMixin.ts","../src/Structure.ts","../src/channels/ForumTag.ts","../src/channels/PermissionOverwrite.ts","../src/channels/ThreadMetadata.ts","../src/channels/Channel.ts","../src/utils/type-guards.ts","../src/Mixin.ts","../src/channels/AnnouncementChannel.ts","../src/channels/AnnouncementThreadChannel.ts","../src/channels/CategoryChannel.ts","../src/channels/DMChannel.ts","../src/channels/ForumChannel.ts","../src/channels/GroupDMChannel.ts","../src/channels/MediaChannel.ts","../src/channels/PrivateThreadChannel.ts","../src/channels/PublicThreadChannel.ts","../src/channels/StageChannel.ts","../src/channels/TextChannel.ts","../src/channels/VoiceChannel.ts","../src/invites/Invite.ts","../src/users/AvatarDecorationData.ts","../src/users/User.ts","../src/users/Connection.ts","../src/utils/optimization.ts"],"sourcesContent":["import type { EnumLike, NonAbstract, RecursiveReadonlyArray } from '../utils/types.js';\n\n// TODO: this currently is mostly copied from mainlib discord.js v14 and definitely needs a refactor in a later iteration\n\n/**\n * Data that can be resolved to give a bit field. This can be:\n * A bit number (this can be a number literal or a value taken from {@link (BitField:class).Flags})\n * A string bit number\n * An instance of BitField\n * An Array of BitFieldResolvable\n */\nexport type BitFieldResolvable<Flags extends string> =\n\t| Flags\n\t| Readonly<BitField<Flags>>\n\t| RecursiveReadonlyArray<Flags | Readonly<BitField<Flags>> | bigint | number | `${bigint}`>\n\t| bigint\n\t| number\n\t| `${bigint}`;\n\n/**\n * Data structure that makes it easy to interact with a bit field.\n */\nexport abstract class BitField<Flags extends string> {\n\t/**\n\t * Numeric bit field flags.\n\t *\n\t * @remarks Defined in extension classes\n\t */\n\tpublic static readonly Flags: EnumLike<unknown, bigint | number> = {};\n\n\tpublic static readonly DefaultBit: bigint = 0n;\n\n\t/**\n\t * Bitfield of the packed bits\n\t */\n\tpublic bitField: bigint;\n\n\tdeclare public ['constructor']: NonAbstract<typeof BitField<Flags>>;\n\n\t/**\n\t * @param bits - Bit(s) to read from\n\t */\n\tpublic constructor(bits: BitFieldResolvable<Flags> = this.constructor.DefaultBit) {\n\t\tthis.bitField = this.constructor.resolve(bits);\n\t}\n\n\t/**\n\t * Checks whether the bit field has a bit, or any of multiple bits.\n\t *\n\t * @param bit - Bit(s) to check for\n\t * @returns Whether the bit field has the bit(s)\n\t */\n\tpublic any(bit: BitFieldResolvable<Flags>) {\n\t\treturn (this.bitField & this.constructor.resolve(bit)) !== this.constructor.DefaultBit;\n\t}\n\n\t/**\n\t * Checks if this bit field equals another\n\t *\n\t * @param bit - Bit(s) to check for\n\t * @returns Whether this bit field equals the other\n\t */\n\tpublic equals(bit: BitFieldResolvable<Flags>) {\n\t\treturn this.bitField === this.constructor.resolve(bit);\n\t}\n\n\t/**\n\t * Checks whether the bit field has a bit, or multiple bits.\n\t *\n\t * @param bit - Bit(s) to check for\n\t * @returns Whether the bit field has the bit(s)\n\t */\n\tpublic has(bit: BitFieldResolvable<Flags>, ..._hasParams: unknown[]) {\n\t\tconst resolvedBit = this.constructor.resolve(bit);\n\t\treturn (this.bitField & resolvedBit) === resolvedBit;\n\t}\n\n\t/**\n\t * Gets all given bits that are missing from the bit field.\n\t *\n\t * @param bits - Bit(s) to check for\n\t * @param hasParams - Additional parameters for the has method, if any\n\t * @returns A bit field containing the missing bits\n\t */\n\tpublic missing(bits: BitFieldResolvable<Flags>, ...hasParams: readonly unknown[]) {\n\t\treturn new this.constructor(bits).remove(this).toArray(...hasParams);\n\t}\n\n\t/**\n\t * Freezes these bits, making them immutable.\n\t *\n\t * @returns This bit field but frozen\n\t */\n\tpublic freeze() {\n\t\treturn Object.freeze(this);\n\t}\n\n\t/**\n\t * Adds bits to these ones.\n\t *\n\t * @param bits - Bits to add\n\t * @returns These bits or new BitField if the instance is frozen.\n\t */\n\tpublic add(...bits: BitFieldResolvable<Flags>[]) {\n\t\tlet total = this.constructor.DefaultBit;\n\t\tfor (const bit of bits) {\n\t\t\ttotal |= this.constructor.resolve(bit);\n\t\t}\n\n\t\tif (Object.isFrozen(this)) return new this.constructor(this.bitField | total);\n\t\tthis.bitField |= total;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes bits from these.\n\t *\n\t * @param bits - Bits to remove\n\t * @returns These bits or new BitField if the instance is frozen.\n\t */\n\tpublic remove(...bits: BitFieldResolvable<Flags>[]) {\n\t\tlet total = this.constructor.DefaultBit;\n\t\tfor (const bit of bits) {\n\t\t\ttotal |= this.constructor.resolve(bit);\n\t\t}\n\n\t\tif (Object.isFrozen(this)) return new this.constructor(this.bitField & ~total);\n\t\tthis.bitField &= ~total;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Gets an object mapping field names to a boolean indicating whether the bit is available.\n\t *\n\t * @param hasParams - Additional parameters for the has method, if any\n\t * @returns An object mapping field names to a boolean indicating whether the bit is available\n\t */\n\tpublic serialize(...hasParams: readonly unknown[]) {\n\t\tconst serialized: Partial<Record<keyof Flags, boolean>> = {};\n\t\tfor (const [flag, bit] of Object.entries(this.constructor.Flags)) {\n\t\t\tif (Number.isNaN(Number(flag))) serialized[flag as keyof Flags] = this.has(bit as bigint | number, ...hasParams);\n\t\t}\n\n\t\treturn serialized;\n\t}\n\n\t/**\n\t * Gets an Array of bit field names based on the bits available.\n\t *\n\t * @param hasParams - Additional parameters for the has method, if any\n\t * @returns An Array of bit field names\n\t */\n\tpublic toArray(...hasParams: readonly unknown[]) {\n\t\treturn [...this[Symbol.iterator](...hasParams)];\n\t}\n\n\tpublic toJSON(asNumber?: boolean) {\n\t\tif (asNumber) {\n\t\t\tif (this.bitField > Number.MAX_SAFE_INTEGER) {\n\t\t\t\tthrow new RangeError(\n\t\t\t\t\t`Cannot convert bitfield value ${this.bitField} to number, as it is bigger than ${Number.MAX_SAFE_INTEGER} (the maximum safe integer)`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn Number(this.bitField);\n\t\t}\n\n\t\treturn this.bitField.toString();\n\t}\n\n\tpublic valueOf() {\n\t\treturn this.bitField;\n\t}\n\n\tpublic *[Symbol.iterator](...hasParams: unknown[]) {\n\t\tfor (const bitName of Object.keys(this.constructor.Flags)) {\n\t\t\tif (Number.isNaN(Number(bitName)) && this.has(bitName as Flags, ...hasParams)) yield bitName as Flags;\n\t\t}\n\t}\n\n\t/**\n\t * Resolves bit fields to their numeric form.\n\t *\n\t * @param bit - bit(s) to resolve\n\t * @returns the numeric value of the bit fields\n\t */\n\tpublic static resolve<Flags extends string = string>(bit: BitFieldResolvable<Flags>): bigint {\n\t\tconst DefaultBit = this.DefaultBit;\n\t\tif (typeof bit === 'bigint' && bit >= DefaultBit) return bit;\n\t\tif (typeof bit === 'number' && BigInt(bit) >= DefaultBit) return BigInt(bit);\n\t\tif (bit instanceof BitField) return bit.bitField;\n\t\tif (Array.isArray(bit)) {\n\t\t\treturn bit.map((bit_) => this.resolve(bit_)).reduce((prev, bit_) => prev | bit_, DefaultBit);\n\t\t}\n\n\t\tif (typeof bit === 'string') {\n\t\t\tif (!Number.isNaN(Number(bit))) return BigInt(bit);\n\t\t\tif (bit in this.Flags) return this.Flags[bit as keyof typeof this.Flags];\n\t\t}\n\n\t\tthrow new Error(`BitFieldInvalid: ${JSON.stringify(bit)}`);\n\t}\n}\n","import { ChannelFlags } from 'discord-api-types/v10';\nimport { BitField } from './BitField.js';\n\n/**\n * Data structure that makes it easy to interact with a {@link (Channel:class).flags} bitfield.\n */\nexport class ChannelFlagsBitField extends BitField<keyof ChannelFlags> {\n\t/**\n\t * Numeric guild channel flags.\n\t */\n\tpublic static override readonly Flags = ChannelFlags;\n\n\tpublic override toJSON() {\n\t\treturn super.toJSON(true);\n\t}\n}\n","/* eslint-disable unicorn/consistent-function-scoping */\nimport { PermissionFlagsBits } from 'discord-api-types/v10';\nimport type { BitFieldResolvable } from './BitField.js';\nimport { BitField } from './BitField.js';\n\n/**\n * Data structure that makes it easy to interact with a permission bit field. All {@link GuildMember}s have a set of\n * permissions in their guild, and each channel in the guild may also have {@link PermissionOverwrite}s for the member\n * that override their default permissions.\n */\nexport class PermissionsBitField extends BitField<keyof typeof PermissionFlagsBits> {\n\t/**\n\t * Numeric permission flags.\n\t *\n\t * @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags}\n\t */\n\tpublic static override Flags = PermissionFlagsBits;\n\n\t/**\n\t * Bit field representing every permission combined\n\t */\n\tpublic static readonly All = Object.values(PermissionFlagsBits).reduce((all, perm) => all | perm, 0n);\n\n\t/**\n\t * Bit field representing the default permissions for users\n\t */\n\tpublic static readonly Default = 104_324_673n;\n\n\t/**\n\t * Bit field representing the permissions required for moderators of stage channels\n\t */\n\tpublic static readonly StageModerator =\n\t\tPermissionFlagsBits.ManageChannels | PermissionFlagsBits.MuteMembers | PermissionFlagsBits.MoveMembers;\n\n\t/**\n\t * Gets all given bits that are missing from the bit field.\n\t *\n\t * @param bits - Bit(s) to check for\n\t * @param checkAdmin - Whether to allow the administrator permission to override\n\t * @returns A bit field containing the missing permissions\n\t */\n\tpublic override missing(bits: BitFieldResolvable<keyof typeof PermissionFlagsBits>, checkAdmin = true) {\n\t\treturn checkAdmin && this.has(PermissionFlagsBits.Administrator) ? [] : super.missing(bits);\n\t}\n\n\t/**\n\t * Checks whether the bit field has a permission, or any of multiple permissions.\n\t *\n\t * @param permission - Permission(s) to check for\n\t * @param checkAdmin - Whether to allow the administrator permission to override\n\t * @returns Whether the bit field has the permission(s)\n\t */\n\tpublic override any(permission: BitFieldResolvable<keyof typeof PermissionFlagsBits>, checkAdmin = true) {\n\t\treturn (checkAdmin && super.has(PermissionFlagsBits.Administrator)) || super.any(permission);\n\t}\n\n\t/**\n\t * Checks whether the bit field has a permission, or multiple permissions.\n\t *\n\t * @param permission - Permission(s) to check for\n\t * @param checkAdmin - Whether to allow the administrator permission to override\n\t * @returns Whether the bit field has the permission(s)\n\t */\n\tpublic override has(permission: BitFieldResolvable<keyof typeof PermissionFlagsBits>, checkAdmin = true) {\n\t\treturn (checkAdmin && super.has(PermissionFlagsBits.Administrator)) || super.has(permission);\n\t}\n\n\t/**\n\t * Gets an Array of bitfield names based on the permissions available.\n\t *\n\t * @returns An Array of permission names\n\t */\n\tpublic override toArray() {\n\t\treturn super.toArray(false);\n\t}\n}\n","export const kData = Symbol.for('djs.structures.data');\nexport const kClone = Symbol.for('djs.structures.clone');\nexport const kPatch = Symbol.for('djs.structures.patch');\nexport const kExpiresTimestamp = Symbol.for('djs.structures.expiresTimestamp');\nexport const kCreatedTimestamp = Symbol.for('djs.structures.createdTimestamp');\nexport const kEditedTimestamp = Symbol.for('djs.structures.editedTimestamp');\nexport const kArchiveTimestamp = Symbol.for('djs.structures.archiveTimestamp');\n\nexport const kAllow = Symbol.for('djs.structures.allow');\nexport const kDeny = Symbol.for('djs.structures.deny');\n\nexport const kLastPinTimestamp = Symbol.for('djs.structures.lastPinTimestamp');\n\nexport const kMixinConstruct = Symbol.for('djs.structures.mixin.construct');\nexport const kMixinToJSON = Symbol.for('djs.structures.mixin.toJSON');\n","import type { ChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface AppliedTagsMixin extends Channel<ChannelType.PublicThread> {}\n\nexport class AppliedTagsMixin {\n\t/**\n\t * The ids of the set of tags that have been applied to a thread in a {@link (ForumChannel:class)} or a {@link (MediaChannel:class)}.\n\t */\n\tpublic get appliedTags(): readonly string[] | null {\n\t\treturn Array.isArray(this[kData].applied_tags) ? this[kData].applied_tags : null;\n\t}\n}\n","import type { ChannelType, ThreadChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface ChannelOwnerMixin<Type extends ChannelType.GroupDM | ThreadChannelType> extends Channel<Type> {}\n\nexport class ChannelOwnerMixin<Type extends ChannelType.GroupDM | ThreadChannelType> {\n\t/**\n\t * The id of the creator of the group DM or thread\n\t */\n\tpublic get ownerId() {\n\t\treturn this[kData].owner_id;\n\t}\n}\n","import { channelLink } from '@discordjs/formatters';\nimport type { GuildChannelType } from 'discord-api-types/v10';\nimport { ChannelFlagsBitField } from '../../bitfields/ChannelFlagsBitField.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface GuildChannelMixin<Type extends GuildChannelType = GuildChannelType> extends Channel<Type> {}\n\nexport class GuildChannelMixin<Type extends GuildChannelType = GuildChannelType> {\n\t/**\n\t * The flags that are applied to the channel.\n\t *\n\t * @privateRemarks The type of `flags` can be narrowed in Guild Channels and DMChannel to ChannelFlags, and in GroupDM channel\n\t * to null, respecting Omit behaviors\n\t */\n\tpublic get flags() {\n\t\treturn this[kData].flags ? new ChannelFlagsBitField(this[kData].flags) : null;\n\t}\n\n\t/**\n\t * THe id of the guild this channel is in.\n\t */\n\tpublic get guildId() {\n\t\treturn this[kData].guild_id!;\n\t}\n\n\t/**\n\t * The URL to this channel.\n\t */\n\tpublic get url() {\n\t\treturn channelLink(this.id, this.guildId);\n\t}\n\n\t/**\n\t * Indicates whether this channel is in a guild\n\t */\n\tpublic isGuildBased(): this is GuildChannelMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { ChannelType, GuildChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport { GuildChannelMixin } from './GuildChannelMixin.js';\n\nexport class ChannelParentMixin<\n\tType extends Exclude<GuildChannelType, ChannelType.GuildCategory | ChannelType.GuildDirectory>,\n> extends GuildChannelMixin<Type> {\n\t/**\n\t * The id of the parent category for a channel (each parent category can contain up to 50 channels) or id of the parent channel for a thread\n\t */\n\tpublic get parentId() {\n\t\treturn this[kData].parent_id;\n\t}\n\n\t/**\n\t * Whether the channel is nsfw\n\t */\n\tpublic get nsfw() {\n\t\treturn this[kData].nsfw;\n\t}\n}\n","import type { ChannelType, GuildChannelType, ThreadChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface ChannelPermissionMixin<\n\tType extends Exclude<GuildChannelType, ChannelType.GuildDirectory | ThreadChannelType> = Exclude<\n\t\tGuildChannelType,\n\t\tChannelType.GuildDirectory | ThreadChannelType\n\t>,\n> extends Channel<Type> {}\n\n/**\n * @remarks has an array of sub-structures {@link PermissionOverwrite} that extending mixins should add to their DataTemplate and _optimizeData\n */\nexport class ChannelPermissionMixin<\n\tType extends Exclude<GuildChannelType, ChannelType.GuildDirectory | ThreadChannelType> = Exclude<\n\t\tGuildChannelType,\n\t\tChannelType.GuildDirectory | ThreadChannelType\n\t>,\n> {\n\t/**\n\t * The sorting position of the channel\n\t */\n\tpublic get position() {\n\t\treturn this[kData].position;\n\t}\n\n\t/**\n\t * Indicates whether this channel can have permission overwrites\n\t */\n\tpublic isPermissionCapable(): this is ChannelPermissionMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { ChannelType, ThreadChannelType } from 'discord-api-types/v10';\nimport { kLastPinTimestamp, kMixinConstruct, kMixinToJSON } from '../../utils/symbols.js';\nimport type { Channel, ChannelDataType } from '../Channel.js';\n\nexport interface ChannelPinMixin<\n\tType extends ChannelType.DM | ChannelType.GuildAnnouncement | ChannelType.GuildText | ThreadChannelType,\n> extends Channel<Type> {}\n\nexport class ChannelPinMixin<\n\tType extends ChannelType.DM | ChannelType.GuildAnnouncement | ChannelType.GuildText | ThreadChannelType,\n> {\n\t/**\n\t * The timestamp of when the last pin in the channel happened\n\t */\n\tdeclare protected [kLastPinTimestamp]: number | null;\n\n\t/**\n\t * The template used for removing data from the raw data stored for each Channel.\n\t */\n\tpublic static readonly DataTemplate: Partial<\n\t\tChannelDataType<ChannelType.DM | ChannelType.GuildAnnouncement | ChannelType.GuildText | ThreadChannelType>\n\t> = {\n\t\tset last_pin_timestamp(_: string) {},\n\t};\n\n\tpublic [kMixinConstruct]() {\n\t\tthis[kLastPinTimestamp] ??= null;\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.optimizeData}\n\t */\n\tprotected optimizeData(data: Partial<ChannelDataType<Type>>) {\n\t\tif (data.last_pin_timestamp) {\n\t\t\tthis[kLastPinTimestamp] = Date.parse(data.last_pin_timestamp);\n\t\t}\n\t}\n\n\t/**\n\t * The timestamp of when the last pin in the channel happened.\n\t */\n\tpublic get lastPinTimestamp() {\n\t\treturn this[kLastPinTimestamp];\n\t}\n\n\t/**\n\t * The Date of when the last pin in the channel happened\n\t */\n\tpublic get lastPinAt() {\n\t\tconst lastPinTimestamp = this.lastPinTimestamp;\n\t\treturn lastPinTimestamp ? new Date(lastPinTimestamp) : null;\n\t}\n\n\t/**\n\t * Adds data from optimized properties omitted from [kData].\n\t *\n\t * @param data - the result of {@link (Structure:class).toJSON}\n\t */\n\tprotected [kMixinToJSON](data: Partial<ChannelDataType<Type>>) {\n\t\tdata.last_pin_timestamp = this[kLastPinTimestamp] ? new Date(this[kLastPinTimestamp]).toISOString() : null;\n\t}\n}\n","import type { TextChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface TextChannelMixin<Type extends TextChannelType = TextChannelType> extends Channel<Type> {}\n\nexport class TextChannelMixin<Type extends TextChannelType = TextChannelType> {\n\t/**\n\t * The id of the last message sent in this channel.\n\t */\n\tpublic get lastMessageId() {\n\t\treturn this[kData].last_message_id;\n\t}\n\n\t/**\n\t * Indicates whether this channel can contain messages\n\t */\n\tpublic isTextBased(): this is TextChannelMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { GuildTextChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport { TextChannelMixin } from './TextChannelMixin.js';\n\nexport class ChannelSlowmodeMixin<Type extends GuildTextChannelType> extends TextChannelMixin<Type> {\n\t/**\n\t * The rate limit per user (slowmode) of this channel.\n\t */\n\tpublic get rateLimitPerUser() {\n\t\treturn this[kData].rate_limit_per_user;\n\t}\n}\n","import type { ChannelType, GuildTextChannelType, ThreadChannelType } from 'discord-api-types/v10';\nimport type { Channel } from '../Channel.js';\n\nexport interface ChannelWebhookMixin<\n\tType extends ChannelType.GuildForum | ChannelType.GuildMedia | Exclude<GuildTextChannelType, ThreadChannelType> =\n\t\t| ChannelType.GuildForum\n\t\t| ChannelType.GuildMedia\n\t\t| Exclude<GuildTextChannelType, ThreadChannelType>,\n> extends Channel<Type> {}\n\nexport class ChannelWebhookMixin<\n\tType extends ChannelType.GuildForum | ChannelType.GuildMedia | Exclude<GuildTextChannelType, ThreadChannelType> =\n\t\t| ChannelType.GuildForum\n\t\t| ChannelType.GuildMedia\n\t\t| Exclude<GuildTextChannelType, ThreadChannelType>,\n> {\n\t/**\n\t * Indicates whether this channel can have webhooks\n\t */\n\tpublic isWebhookCapable(): this is ChannelWebhookMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { ChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\nimport { ChannelWebhookMixin } from './ChannelWebhookMixin.js';\n\nexport interface ChannelTopicMixin<\n\tType extends ChannelType.GuildAnnouncement | ChannelType.GuildForum | ChannelType.GuildMedia | ChannelType.GuildText,\n> extends Channel<Type> {}\n\nexport class ChannelTopicMixin<\n\tType extends ChannelType.GuildAnnouncement | ChannelType.GuildForum | ChannelType.GuildMedia | ChannelType.GuildText,\n> extends ChannelWebhookMixin<Type> {\n\t/**\n\t * The topic of this channel.\n\t */\n\tpublic get topic() {\n\t\treturn this[kData].topic;\n\t}\n\n\t/**\n\t * The duration after which new threads get archived by default on this channel.\n\t */\n\tpublic get defaultAutoArchiveDuration() {\n\t\treturn this[kData].default_auto_archive_duration;\n\t}\n\n\t/**\n\t * The default value for rate limit per user (slowmode) on new threads in this channel.\n\t */\n\tpublic get defaultThreadRateLimitPerUser() {\n\t\treturn this[kData].default_thread_rate_limit_per_user;\n\t}\n}\n","import { channelLink } from '@discordjs/formatters';\nimport type { ChannelType } from 'discord-api-types/v10';\nimport type { User } from '../../users/User.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface DMChannelMixin<\n\tType extends ChannelType.DM | ChannelType.GroupDM = ChannelType.DM | ChannelType.GroupDM,\n> extends Channel<Type> {}\n\n/**\n * @remarks has recipients, an array of sub-structures {@link User} that extending mixins should add to their DataTemplate and _optimizeData\n */\nexport class DMChannelMixin<Type extends ChannelType.DM | ChannelType.GroupDM = ChannelType.DM | ChannelType.GroupDM> {\n\t/**\n\t * The URL to this channel.\n\t */\n\tpublic get url() {\n\t\treturn channelLink(this.id);\n\t}\n\n\t/**\n\t * Indicates whether this channel is a DM or DM Group\n\t */\n\tpublic isDMBased(): this is DMChannelMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { ChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface GroupDMMixin extends Channel<ChannelType.GroupDM> {}\n\nexport class GroupDMMixin {\n\t/**\n\t * The icon hash of the group DM.\n\t */\n\tpublic get icon() {\n\t\treturn this[kData].icon;\n\t}\n\n\t/**\n\t * Whether the channel is managed by an application via the `gdm.join` OAuth2 scope.\n\t */\n\tpublic get managed() {\n\t\treturn this[kData].managed;\n\t}\n\n\t/**\n\t * The application id of the group DM creator if it is bot-created.\n\t */\n\tpublic get applicationId() {\n\t\treturn this[kData].application_id;\n\t}\n}\n","import type { ThreadChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface ThreadChannelMixin<Type extends ThreadChannelType = ThreadChannelType> extends Channel<Type> {}\n\n/**\n * @remarks has a sub-structure {@link ThreadMetadata} that extending mixins should add to their DataTemplate and _optimizeData\n */\nexport class ThreadChannelMixin<Type extends ThreadChannelType = ThreadChannelType> {\n\t/**\n\t * The approximate count of users in a thread, stops counting at 50\n\t */\n\tpublic get memberCount() {\n\t\treturn this[kData].member_count;\n\t}\n\n\t/**\n\t * The number of messages (not including the initial message or deleted messages) in a thread.\n\t */\n\tpublic get messageCount() {\n\t\treturn this[kData].message_count;\n\t}\n\n\t/**\n\t * The number of messages ever sent in a thread, it's similar to message_count on message creation,\n\t * but will not decrement the number when a message is deleted.\n\t */\n\tpublic get totalMessageSent() {\n\t\treturn this[kData].total_message_sent;\n\t}\n\n\t/**\n\t * Indicates whether this channel is a thread channel\n\t */\n\tpublic isThread(): this is ThreadChannelMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { ChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface ThreadOnlyChannelMixin<\n\tType extends ChannelType.GuildForum | ChannelType.GuildMedia = ChannelType.GuildForum | ChannelType.GuildMedia,\n> extends Channel<Type> {}\n\n/**\n * @remarks has an array of sub-structures {@link ForumTag} that extending mixins should add to their DataTemplate and _optimizeData\n */\nexport class ThreadOnlyChannelMixin<\n\tType extends ChannelType.GuildForum | ChannelType.GuildMedia = ChannelType.GuildForum | ChannelType.GuildMedia,\n> {\n\t/**\n\t * The emoji to show in the add reaction button on a thread in this channel.\n\t */\n\tpublic get defaultReactionEmoji() {\n\t\treturn this[kData].default_reaction_emoji;\n\t}\n\n\t/**\n\t * The default sort order type used to order posts in this channel.\n\t *\n\t * @defaultValue `null` – indicates a preferred sort order hasn't been set.\n\t */\n\tpublic get defaultSortOrder() {\n\t\treturn this[kData].default_sort_order!;\n\t}\n\n\t/**\n\t * Indicates whether this channel only allows thread creation\n\t */\n\tpublic isThreadOnly(): this is ThreadOnlyChannelMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { ChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\nimport { TextChannelMixin } from './TextChannelMixin.js';\n\nexport interface VoiceChannelMixin<\n\tType extends ChannelType.GuildStageVoice | ChannelType.GuildVoice =\n\t\t| ChannelType.GuildStageVoice\n\t\t| ChannelType.GuildVoice,\n> extends Channel<Type> {}\n\nexport class VoiceChannelMixin<\n\tType extends ChannelType.GuildStageVoice | ChannelType.GuildVoice =\n\t\t| ChannelType.GuildStageVoice\n\t\t| ChannelType.GuildVoice,\n> extends TextChannelMixin<Type> {\n\t/**\n\t * The bitrate (in bits) of the voice channel.\n\t */\n\tpublic get bitrate() {\n\t\treturn this[kData].bitrate!;\n\t}\n\n\t/**\n\t * The voice region id for this channel, automatic when set to null.\n\t */\n\tpublic get rtcRegion() {\n\t\treturn this[kData].rtc_region!;\n\t}\n\n\t/**\n\t * The camera video quality mode of the voice channel, {@link discord-api-types/v10#(VideoQualityMode:enum) | Auto} when not present.\n\t */\n\tpublic get videoQualityMode() {\n\t\treturn this[kData].video_quality_mode!;\n\t}\n\n\t/**\n\t * The user limit of the voice channel.\n\t */\n\tpublic get userLimit() {\n\t\treturn this[kData].user_limit!;\n\t}\n\n\t/**\n\t * Indicates whether this channel has voice connection capabilities\n\t */\n\tpublic override isVoiceBased(): this is VoiceChannelMixin & this {\n\t\treturn true;\n\t}\n}\n","import { kClone, kData, kMixinConstruct, kMixinToJSON, kPatch } from './utils/symbols.js';\nimport type { ReplaceOmittedWithUnknown } from './utils/types.js';\n\nexport const DataTemplatePropertyName = 'DataTemplate';\nexport const OptimizeDataPropertyName = 'optimizeData';\n\n/**\n * Represents a data model from the Discord API\n *\n * @privateRemarks\n * Explanation of the type complexity surround Structure:\n *\n * There are two layers of Omitted generics, one here, which allows omitting things at the library level so we do not accidentally\n * access them, in addition to whatever the user does at the layer above.\n *\n * The second layer, in the exported structure is effectively a type cast that allows the getters types to match whatever data template is used\n *\n * In order to safely set and access this data, the constructor and patch take data as \"partial\" and forcibly assigns it to kData. To accommodate this,\n * kData stores properties as `unknown` when it is omitted, which allows accessing the property in getters even when it may not actually be present.\n * This is the most technically correct way of representing the value, especially since there is no way to guarantee runtime matches the \"type cast.\"\n */\nexport abstract class Structure<DataType extends {}, Omitted extends keyof DataType | '' = ''> {\n\t/**\n\t * A construct function used when mixing to allow mixins to set optimized property defaults\n\t *\n\t * @internal\n\t * @remarks This should only be used to set defaults, setting optimized values should be done\n\t * in the mixins `optimizeData` method, which will be called automatically.\n\t * @param data - The full API data received by the Structure\n\t */\n\tprotected [kMixinConstruct]?(data: Partial<DataType>): void;\n\n\t/**\n\t * A function used when mixing to allow mixins to add properties to the result of toJSON\n\t *\n\t * @internal\n\t * @remarks This should only be used to add properties that the mixin optimizes, if the raw\n\t * JSON data is unchanged the property will already be returned.\n\t * @param data - The result of the base class toJSON Structure before it gets returned\n\t */\n\tprotected [kMixinToJSON]?(data: Partial<DataType>): void;\n\n\t/**\n\t * The template used for removing data from the raw data stored for each Structure.\n\t *\n\t * @remarks This template should be overridden in all subclasses to provide more accurate type information.\n\t * The template in the base {@link Structure} class will have no effect on most subclasses for this reason.\n\t */\n\tprotected static readonly DataTemplate: Record<string, unknown> = {};\n\n\t/**\n\t * @returns A cloned version of the data template, ready to create a new data object.\n\t */\n\tprivate getDataTemplate() {\n\t\treturn Object.create((this.constructor as typeof Structure).DataTemplate);\n\t}\n\n\t/**\n\t * The raw data from the API for this structure\n\t *\n\t * @internal\n\t */\n\tprotected [kData]: Readonly<ReplaceOmittedWithUnknown<Omitted, DataType>>;\n\n\t/**\n\t * Creates a new structure to represent API data\n\t *\n\t * @param data - the data from the API that this structure will represent\n\t * @remarks To be made public in subclasses\n\t * @internal\n\t */\n\tpublic constructor(data: Readonly<Partial<DataType>>, ..._rest: unknown[]) {\n\t\tthis[kData] = Object.assign(this.getDataTemplate(), data);\n\t\tthis[kMixinConstruct]?.(data);\n\t}\n\n\t/**\n\t * Patches the raw data of this object in place\n\t *\n\t * @param data - the updated data from the API to patch with\n\t * @remarks To be made public in subclasses\n\t * @returns this\n\t * @internal\n\t */\n\tprotected [kPatch](data: Readonly<Partial<DataType>>): this {\n\t\tthis[kData] = Object.assign(this.getDataTemplate(), this[kData], data);\n\t\tthis.optimizeData(data);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Creates a clone of this structure\n\t *\n\t * @returns a clone of this\n\t * @internal\n\t */\n\tprotected [kClone](patchPayload?: Readonly<Partial<DataType>>): typeof this {\n\t\tconst clone = this.toJSON();\n\t\t// @ts-expect-error constructor is of abstract class is unknown\n\t\treturn new this.constructor(\n\t\t\t// Ensure the ts-expect-error only applies to the constructor call\n\t\t\tpatchPayload ? Object.assign(clone, patchPayload) : clone,\n\t\t);\n\t}\n\n\t/**\n\t * Function called to ensure stored raw data is in optimized formats, used in tandem with a data template\n\t *\n\t * @example created_timestamp is an ISO string, this can be stored in optimized form as a number\n\t * @param _data - the raw data received from the API to optimize\n\t * @remarks Implementation to be done in subclasses and mixins where needed.\n\t * For typescript users, mixins must use the closest ancestors access modifier.\n\t * @remarks Automatically called in Structure[kPatch] but must be called manually in the constructor\n\t * of any class implementing this method.\n\t * @remarks Additionally, when implementing, ensure to call `super._optimizeData` if any class in the super chain aside\n\t * from Structure contains an implementation.\n\t * Note: mixins do not need to call super ever as the process of mixing walks the prototype chain.\n\t * @virtual\n\t * @internal\n\t */\n\tprotected optimizeData(_data: Partial<DataType>) {}\n\n\t/**\n\t * Transforms this object to its JSON format with raw API data (or close to it),\n\t * automatically called by `JSON.stringify()` when this structure is stringified\n\t *\n\t * @remarks\n\t * The type of this data is determined by omissions at runtime and is only guaranteed for default omissions\n\t * @privateRemarks\n\t * When omitting properties at the library level, this must be overridden to re-add those properties\n\t */\n\tpublic toJSON(): DataType {\n\t\t// This will be DataType provided nothing is omitted, when omits occur, subclass needs to overwrite this.\n\t\tconst data =\n\t\t\t// Spread is way faster than structuredClone, but is shallow. So use it only if there is no nested objects\n\t\t\t(\n\t\t\t\tObject.values(this[kData]).some((value) => typeof value === 'object' && value !== null)\n\t\t\t\t\t? structuredClone(this[kData])\n\t\t\t\t\t: { ...this[kData] }\n\t\t\t) as DataType;\n\t\tthis[kMixinToJSON]?.(data);\n\t\treturn data;\n\t}\n}\n","import type { APIGuildForumTag } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents metadata of a thread channel on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class ForumTag<Omitted extends keyof APIGuildForumTag | '' = ''> extends Structure<APIGuildForumTag, Omitted> {\n\tpublic constructor(data: Partialize<APIGuildForumTag, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the tag.\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The name of the tag.\n\t */\n\tpublic get name() {\n\t\treturn this[kData].name;\n\t}\n\n\t/**\n\t * Whether this tag can only be added to or removed from threads by a member with the {@link discord-api-types/v10#(PermissionFlagsBits:variable) | ManageThreads} permission.\n\t */\n\tpublic get moderated() {\n\t\treturn this[kData].moderated;\n\t}\n\n\t/**\n\t * The id of a guild's custom emoji.\n\t */\n\tpublic get emojiId() {\n\t\treturn this[kData].emoji_id;\n\t}\n\n\t/**\n\t * The unicode character of the emoji.\n\t */\n\tpublic get emojiName() {\n\t\treturn this[kData].emoji_name;\n\t}\n\n\t/**\n\t * The textual representation of this tag's emoji. Either a unicode character or a guild emoji mention.\n\t */\n\tpublic get emoji() {\n\t\treturn this.emojiName ?? `<:_:${this.emojiId}>`;\n\t}\n}\n","import type { APIOverwrite } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { PermissionsBitField } from '../bitfields/PermissionsBitField.js';\nimport { kAllow, kData, kDeny } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents metadata of a thread channel on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class PermissionOverwrite<Omitted extends keyof APIOverwrite | '' = 'allow' | 'deny'> extends Structure<\n\tAPIOverwrite,\n\tOmitted\n> {\n\tprotected [kAllow]: bigint | null = null;\n\n\tprotected [kDeny]: bigint | null = null;\n\n\tpublic constructor(data: Partialize<APIOverwrite, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n\n\t/**\n\t * The template used for removing data from the raw data stored for each ThreadMetadata\n\t *\n\t * @remarks This template has defaults, if you want to remove additional data and keep the defaults,\n\t * use `Object.defineProperties`. To override the defaults, set this value directly.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIOverwrite> = {\n\t\tset allow(_: string) {},\n\t\tset deny(_: string) {},\n\t};\n\n\t/**\n\t * {@inheritDoc Structure.optimizeData}\n\t */\n\tprotected override optimizeData(data: Partial<APIOverwrite>) {\n\t\tif (data.allow) {\n\t\t\tthis[kAllow] = BigInt(data.allow);\n\t\t}\n\n\t\tif (data.deny) {\n\t\t\tthis[kDeny] = BigInt(data.deny);\n\t\t}\n\t}\n\n\t/**\n\t * The permission bit set allowed by this overwrite.\n\t */\n\tpublic get allow() {\n\t\tconst allow = this[kAllow];\n\t\treturn typeof allow === 'bigint' ? new PermissionsBitField(allow) : null;\n\t}\n\n\t/**\n\t * The permission bit set denied by this overwrite.\n\t */\n\tpublic get deny() {\n\t\tconst deny = this[kDeny];\n\t\treturn typeof deny === 'bigint' ? new PermissionsBitField(deny) : null;\n\t}\n\n\t/**\n\t * The role or user id for this overwrite.\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The type of this overwrite.\n\t */\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.toJSON}\n\t */\n\tpublic override toJSON() {\n\t\tconst clone = super.toJSON();\n\t\tif (this[kAllow]) {\n\t\t\tclone.allow = this[kAllow].toString();\n\t\t}\n\n\t\tif (this[kDeny]) {\n\t\t\tclone.deny = this[kDeny].toString();\n\t\t}\n\n\t\treturn clone;\n\t}\n}\n","import type { APIThreadMetadata } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kArchiveTimestamp, kCreatedTimestamp, kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents metadata of a thread channel on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class ThreadMetadata<\n\tOmitted extends keyof APIThreadMetadata | '' = 'archive_timestamp' | 'create_timestamp',\n> extends Structure<APIThreadMetadata, Omitted> {\n\tprotected [kArchiveTimestamp]: number | null = null;\n\n\tprotected [kCreatedTimestamp]: number | null = null;\n\n\tpublic constructor(data: Partialize<APIThreadMetadata, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n\n\t/**\n\t * The template used for removing data from the raw data stored for each ThreadMetadata\n\t *\n\t * @remarks This template has defaults, if you want to remove additional data and keep the defaults,\n\t * use `Object.defineProperties`. To override the defaults, set this value directly.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIThreadMetadata> = {\n\t\tset create_timestamp(_: string) {},\n\t\tset archive_timestamp(_: string) {},\n\t};\n\n\t/**\n\t * {@inheritDoc Structure.optimizeData}\n\t */\n\tprotected override optimizeData(data: Partial<APIThreadMetadata>) {\n\t\tif (data.create_timestamp) {\n\t\t\tthis[kCreatedTimestamp] = Date.parse(data.create_timestamp);\n\t\t}\n\n\t\tif (data.archive_timestamp) {\n\t\t\tthis[kArchiveTimestamp] = Date.parse(data.archive_timestamp);\n\t\t}\n\t}\n\n\t/**\n\t * Whether the thread is archived.\n\t */\n\tpublic get archived() {\n\t\treturn this[kData].archived;\n\t}\n\n\t/**\n\t * The timestamp when the thread's archive status was last changed, used for calculating recent activity.\n\t */\n\tpublic get archivedTimestamp() {\n\t\treturn this[kArchiveTimestamp];\n\t}\n\n\t/**\n\t * The timestamp when the thread was created; only populated for threads created after 2022-01-09.\n\t */\n\tpublic get createdTimestamp() {\n\t\treturn this[kCreatedTimestamp];\n\t}\n\n\t/**\n\t * The thread will stop showing in the channel list after auto_archive_duration minutes of inactivity,\n\t */\n\tpublic get autoArchiveDuration() {\n\t\treturn this[kData].auto_archive_duration;\n\t}\n\n\t/**\n\t * Whether non-moderators can add other non-moderators to a thread; only available on private threads.\n\t */\n\tpublic get invitable() {\n\t\treturn this[kData].invitable;\n\t}\n\n\t/**\n\t * Whether the thread is locked; when a thread is locked, only users with {@link discord-api-types/v10#(PermissionFlagsBits:variable) | ManageThreads} can unarchive it.\n\t */\n\tpublic get locked() {\n\t\treturn this[kData].locked;\n\t}\n\n\t/**\n\t * The time the thread was archived at\n\t */\n\tpublic get archivedAt() {\n\t\tconst archivedTimestamp = this.archivedTimestamp;\n\t\treturn archivedTimestamp ? new Date(archivedTimestamp) : null;\n\t}\n\n\t/**\n\t * The time the thread was created at\n\t */\n\tpublic get createdAt() {\n\t\tconst createdTimestamp = this.createdTimestamp;\n\t\treturn createdTimestamp ? new Date(createdTimestamp) : null;\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.toJSON}\n\t */\n\tpublic override toJSON() {\n\t\tconst data = super.toJSON();\n\t\tif (this[kArchiveTimestamp]) {\n\t\t\tdata.archive_timestamp = new Date(this[kArchiveTimestamp]).toISOString();\n\t\t}\n\n\t\tif (this[kCreatedTimestamp]) {\n\t\t\tdata.create_timestamp = new Date(this[kCreatedTimestamp]).toISOString();\n\t\t}\n\n\t\treturn data;\n\t}\n}\n","import { DiscordSnowflake } from '@sapphire/snowflake';\nimport type { APIChannel, APIPartialChannel, ChannelType, ChannelFlags } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { ChannelFlagsBitField } from '../bitfields/ChannelFlagsBitField.js';\nimport { kData, kPatch } from '../utils/symbols.js';\nimport { isIdSet } from '../utils/type-guards.js';\nimport type { Partialize } from '../utils/types.js';\nimport type { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport type { ChannelWebhookMixin } from './mixins/ChannelWebhookMixin.js';\nimport type { DMChannelMixin } from './mixins/DMChannelMixin.js';\nimport type { GuildChannelMixin } from './mixins/GuildChannelMixin.js';\nimport type { TextChannelMixin } from './mixins/TextChannelMixin.js';\nimport type { ThreadChannelMixin } from './mixins/ThreadChannelMixin.js';\nimport type { ThreadOnlyChannelMixin } from './mixins/ThreadOnlyChannelMixin.js';\nimport type { VoiceChannelMixin } from './mixins/VoiceChannelMixin.js';\n\nexport type PartialChannel = Channel<ChannelType, Exclude<keyof APIChannel, keyof APIPartialChannel>>;\n\n/**\n * The data stored by a {@link Channel} structure based on its {@link (Channel:class).\"type\"} property.\n */\nexport type ChannelDataType<Type extends ChannelType | 'unknown'> = Type extends ChannelType\n\t? Extract<APIChannel, { type: Type }>\n\t: APIPartialChannel;\n\n/**\n * Represents any channel on Discord.\n *\n * @typeParam Type - Specify the type of the channel being constructed for more accurate data types\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks Although this class _can_ be instantiated directly for any channel type,\n * it's intended to be subclassed with the appropriate mixins for each channel type.\n */\nexport class Channel<\n\tType extends ChannelType | 'unknown' = ChannelType,\n\tOmitted extends keyof ChannelDataType<Type> | '' = '',\n> extends Structure<ChannelDataType<Type>, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each Channel.\n\t *\n\t * @remarks This template is only guaranteed to apply to channels constructed directly via `new Channel()`.\n\t * Use the appropriate subclass template to remove data from that channel type.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIChannel> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the channel\n\t */\n\tpublic constructor(data: Partialize<ChannelDataType<Type>, Omitted>) {\n\t\tsuper(data as ChannelDataType<Type>);\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.[kPatch]}\n\t *\n\t * @internal\n\t */\n\tpublic override [kPatch](data: Partial<ChannelDataType<Type>>) {\n\t\treturn super[kPatch](data);\n\t}\n\n\t/**\n\t * The id of the channel\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The type of the channel\n\t */\n\tpublic get type() {\n\t\t// This cast can be incorrect when type is omitted and if the wrong type of channel was constructed\n\t\treturn this[kData].type as Type extends 'unknown' ? number : Type;\n\t}\n\n\t/**\n\t * The name of the channel, null for DMs\n\t *\n\t * @privateRemarks The type of `name` can be narrowed in Guild Channels and DM channels to string and null respectively,\n\t * respecting Omit behaviors\n\t */\n\tpublic get name() {\n\t\treturn this[kData].name;\n\t}\n\n\t/**\n\t * The flags that are applied to the channel.\n\t *\n\t * @privateRemarks The type of `flags` can be narrowed in Guild Channels and DMChannel to ChannelFlags, and in GroupDM channel\n\t * to null, respecting Omit behaviors\n\t */\n\tpublic get flags() {\n\t\tconst flags =\n\t\t\t'flags' in this[kData] && typeof this[kData].flags === 'number' ? (this[kData].flags as ChannelFlags) : null;\n\t\treturn flags ? new ChannelFlagsBitField(flags) : null;\n\t}\n\n\t/**\n\t * The timestamp the channel was created at\n\t */\n\tpublic get createdTimestamp() {\n\t\treturn isIdSet(this.id) ? DiscordSnowflake.timestampFrom(this.id) : null;\n\t}\n\n\t/**\n\t * The time the channel was created at\n\t */\n\tpublic get createdAt() {\n\t\tconst createdTimestamp = this.createdTimestamp;\n\t\treturn createdTimestamp ? new Date(createdTimestamp) : null;\n\t}\n\n\t/**\n\t * Indicates whether this channel is a thread channel\n\t *\n\t * @privateRemarks Overridden to `true` on `ThreadChannelMixin`\n\t */\n\tpublic isThread(): this is ThreadChannelMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel can contain messages\n\t *\n\t * @privateRemarks Overridden to `true` on `TextChannelMixin`\n\t */\n\tpublic isTextBased(): this is TextChannelMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel is in a guild\n\t *\n\t * @privateRemarks Overridden to `true` on `GuildChannelMixin`\n\t */\n\tpublic isGuildBased(): this is GuildChannelMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel is a DM or DM Group\n\t *\n\t * @privateRemarks Overridden to `true` on `DMChannelMixin`\n\t */\n\tpublic isDMBased(): this is DMChannelMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel has voice connection capabilities\n\t *\n\t * @privateRemarks Overridden to `true` on `VoiceChannelMixin`\n\t */\n\tpublic isVoiceBased(): this is VoiceChannelMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel only allows thread creation\n\t *\n\t * @privateRemarks Overridden to `true` on `ThreadOnlyChannelMixin`\n\t */\n\tpublic isThreadOnly(): this is ThreadOnlyChannelMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel can have permission overwrites\n\t *\n\t * @privateRemarks Overridden to `true` on `ChannelPermissionsMixin`\n\t */\n\tpublic isPermissionCapable(): this is ChannelPermissionMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel can have webhooks\n\t *\n\t * @privateRemarks Overridden to `true` on `ChannelWebhooksMixin`\n\t */\n\tpublic isWebhookCapable(): this is ChannelWebhookMixin & this {\n\t\treturn false;\n\t}\n}\n","export function isIdSet(id: unknown): id is bigint | string {\n\treturn typeof id === 'string' || typeof id === 'bigint';\n}\n","import { DataTemplatePropertyName, OptimizeDataPropertyName, type Structure } from './Structure.js';\nimport { kMixinConstruct, kMixinToJSON } from './utils/symbols.js';\n\nexport type Mixinable<ClassType> = new (...args: unknown[]) => ClassType;\n\nexport type MixinBase<BaseClass extends Structure<{}>> =\n\tBaseClass extends Structure<infer DataType, infer Omitted> ? Structure<DataType, Omitted> : never;\n\n/**\n * Copies the prototype (getters, setters, and methods) of all mixins to the destination class.\n * For type information see {@link MixinTypes}\n *\n * @param destination - The class to apply the mixins to, must extend the base that the mixins expect it to.\n * @param mixins - Classes that contain \"pure\" prototypes to be copied on top of the destination class prototype\n * @remarks All mixins should be \"pure\" in that they only contain getters, setters, and methods.\n * The runtime code will only copy these, and adding properties to the class only results\n * in the types of the mixed class being wrong.\n * @example\n * ```\n * // Interface merging on the mixin to give type access to props on the base and kData that are available once copied\n * interface TextMixin extends Channel {}\n * class TextMixin {\n * \t// Methods / getters\n * }\n *\n * // Interface merging on the mixed class to give it accurate type information within the declaration and when instantiated\n * interface TextChannel extends MixinTypes<Channel, [TextMixin]> {}\n * class TextChannel extends Channel {}\n *\n * // Apply for runtime\n * Mixin(TextChannel, [TextMixin])\n * ```\n * @typeParam DestinationClass - The class to be mixed, ensures that the mixins provided can be used with this destination\n */\nexport function Mixin<DestinationClass extends typeof Structure<{}>>(\n\tdestination: DestinationClass,\n\tmixins: Mixinable<MixinBase<DestinationClass['prototype']>>[],\n) {\n\tconst dataTemplates: Record<string, unknown>[] = [];\n\tconst dataOptimizations: ((data: unknown) => void)[] = [];\n\tconst enrichToJSONs: ((data: Partial<unknown>) => void)[] = [];\n\tconst constructors: ((data: Partial<unknown>) => void)[] = [];\n\n\tfor (const mixin of mixins) {\n\t\t// The entire prototype chain, in reverse order, since we want to copy it all\n\t\tconst prototypeChain: MixinBase<DestinationClass['prototype']>[] = [];\n\t\tlet extendedClass = mixin;\n\t\twhile (extendedClass.prototype !== undefined) {\n\t\t\tif (\n\t\t\t\tDataTemplatePropertyName in extendedClass &&\n\t\t\t\ttypeof extendedClass.DataTemplate === 'object' &&\n\t\t\t\t// eslint-disable-next-line no-eq-null, eqeqeq\n\t\t\t\textendedClass.DataTemplate != null\n\t\t\t) {\n\t\t\t\tdataTemplates.push(extendedClass.DataTemplate as Record<string, unknown>);\n\t\t\t}\n\n\t\t\tprototypeChain.unshift(extendedClass.prototype);\n\t\t\textendedClass = Object.getPrototypeOf(extendedClass);\n\t\t}\n\n\t\tfor (const prototype of prototypeChain) {\n\t\t\t// Symboled data isn't traversed by Object.entries, we can handle it here\n\t\t\tif (prototype[kMixinConstruct]) {\n\t\t\t\tconstructors.push(prototype[kMixinConstruct]);\n\t\t\t}\n\n\t\t\tif (prototype[kMixinToJSON]) {\n\t\t\t\tenrichToJSONs.push(prototype[kMixinToJSON]);\n\t\t\t}\n\n\t\t\t// Copy instance methods and setters / getters\n\t\t\tconst originalDescriptors = Object.getOwnPropertyDescriptors(prototype);\n\t\t\tconst usingDescriptors: { [prop: string]: PropertyDescriptor } = {};\n\t\t\tfor (const [prop, descriptor] of Object.entries(originalDescriptors)) {\n\t\t\t\t// Drop constructor\n\t\t\t\tif (['constructor'].includes(prop)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Special case for optimize function, we want to combine these\n\t\t\t\tif (prop === OptimizeDataPropertyName) {\n\t\t\t\t\tif (typeof descriptor.value !== 'function')\n\t\t\t\t\t\tthrow new RangeError(`Expected ${prop} to be a function, received ${typeof descriptor.value} instead.`);\n\t\t\t\t\tdataOptimizations.push(descriptor.value);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Shouldn't be anything other than these without being instantiated, but just in case\n\t\t\t\tif (\n\t\t\t\t\ttypeof descriptor.get !== 'undefined' ||\n\t\t\t\t\ttypeof descriptor.set !== 'undefined' ||\n\t\t\t\t\ttypeof descriptor.value === 'function'\n\t\t\t\t) {\n\t\t\t\t\tusingDescriptors[prop] = descriptor;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tObject.defineProperties(destination.prototype, usingDescriptors);\n\t\t}\n\t}\n\n\t// Set the function to call any mixed constructors\n\tif (constructors.length > 0) {\n\t\tObject.defineProperty(destination.prototype, kMixinConstruct, {\n\t\t\twritable: true,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true,\n\t\t\t// eslint-disable-next-line func-name-matching\n\t\t\tvalue: function _mixinConstructors(data: Partial<unknown>) {\n\t\t\t\tfor (const construct of constructors) {\n\t\t\t\t\tconstruct.call(this, data);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t}\n\n\t// Combine all optimizations into a single function\n\tconst baseOptimize = Object.getOwnPropertyDescriptor(destination, OptimizeDataPropertyName);\n\tif (baseOptimize && typeof baseOptimize.value === 'function') {\n\t\t// call base last (mimic constructor behavior)\n\t\tdataOptimizations.push(baseOptimize.value);\n\t}\n\n\tconst superOptimize = Object.getOwnPropertyDescriptor(\n\t\tObject.getPrototypeOf(destination).prototype,\n\t\tOptimizeDataPropertyName,\n\t);\n\t// the mixin base optimize should call super, so we can ignore the super in that case\n\tif (!baseOptimize && superOptimize && typeof superOptimize.value === 'function') {\n\t\t// call super first (mimic constructor behavior)\n\t\tdataOptimizations.unshift(superOptimize.value);\n\t}\n\n\t// If there's more than one optimization or if there's an optimization that isn't on the destination (base)\n\tif (dataOptimizations.length > 1 || (dataOptimizations.length === 1 && !baseOptimize)) {\n\t\tObject.defineProperty(destination.prototype, OptimizeDataPropertyName, {\n\t\t\twritable: true,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true,\n\t\t\t// eslint-disable-next-line func-name-matching\n\t\t\tvalue: function _mixinOptimizeData(data: unknown) {\n\t\t\t\tfor (const optimization of dataOptimizations) {\n\t\t\t\t\toptimization.call(this, data);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t}\n\n\tif (enrichToJSONs.length > 0) {\n\t\tObject.defineProperty(destination.prototype, kMixinToJSON, {\n\t\t\twritable: true,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true,\n\t\t\t// eslint-disable-next-line func-name-matching\n\t\t\tvalue: function _mixinToJSON(data: Partial<unknown>) {\n\t\t\t\tfor (const enricher of enrichToJSONs) {\n\t\t\t\t\tenricher.call(this, data);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t}\n\n\t// Copy the properties (setters) of each mixins template to the destinations template\n\tif (dataTemplates.length > 0) {\n\t\tif (!Object.getOwnPropertyDescriptor(destination, DataTemplatePropertyName)) {\n\t\t\tObject.defineProperty(destination, DataTemplatePropertyName, {\n\t\t\t\tvalue: Object.defineProperties({}, Object.getOwnPropertyDescriptors(destination[DataTemplatePropertyName])),\n\t\t\t\twritable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t});\n\t\t}\n\n\t\tfor (const template of dataTemplates) {\n\t\t\tObject.defineProperties(destination[DataTemplatePropertyName], Object.getOwnPropertyDescriptors(template));\n\t\t}\n\t}\n}\n","import type { APINewsChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { ChannelPinMixin } from './mixins/ChannelPinMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { ChannelTopicMixin } from './mixins/ChannelTopicMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\n\nexport interface AnnouncementChannel<Omitted extends keyof APINewsChannel | '' = ''>\n\textends MixinTypes<\n\t\tChannel<ChannelType.GuildAnnouncement>,\n\t\t[\n\t\t\tTextChannelMixin<ChannelType.GuildAnnouncement>,\n\t\t\tChannelParentMixin<ChannelType.GuildAnnouncement>,\n\t\t\tChannelPermissionMixin<ChannelType.GuildAnnouncement>,\n\t\t\tChannelPinMixin<ChannelType.GuildAnnouncement>,\n\t\t\tChannelSlowmodeMixin<ChannelType.GuildAnnouncement>,\n\t\t\tChannelTopicMixin<ChannelType.GuildAnnouncement>,\n\t\t]\n\t> {}\n\n/**\n * Sample Implementation of a structure for announcement channels, usable by direct end consumers.\n */\nexport class AnnouncementChannel<Omitted extends keyof APINewsChannel | '' = ''> extends Channel<\n\tChannelType.GuildAnnouncement,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APINewsChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(AnnouncementChannel, [\n\tTextChannelMixin,\n\tChannelParentMixin,\n\tChannelPermissionMixin,\n\tChannelPinMixin,\n\tChannelSlowmodeMixin,\n\tChannelTopicMixin,\n]);\n","import type { APIAnnouncementThreadChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelOwnerMixin } from './mixins/ChannelOwnerMixin.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPinMixin } from './mixins/ChannelPinMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { GuildChannelMixin } from './mixins/GuildChannelMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\nimport { ThreadChannelMixin } from './mixins/ThreadChannelMixin.js';\n\nexport interface AnnouncementThreadChannel<Omitted extends keyof APIAnnouncementThreadChannel | '' = ''>\n\textends MixinTypes<\n\t\tChannel<ChannelType.AnnouncementThread>,\n\t\t[\n\t\t\tTextChannelMixin<ChannelType.AnnouncementThread>,\n\t\t\tChannelOwnerMixin<ChannelType.AnnouncementThread>,\n\t\t\tChannelParentMixin<ChannelType.AnnouncementThread>,\n\t\t\tChannelPinMixin<ChannelType.AnnouncementThread>,\n\t\t\tChannelSlowmodeMixin<ChannelType.AnnouncementThread>,\n\t\t\tGuildChannelMixin<ChannelType.AnnouncementThread>,\n\t\t\tThreadChannelMixin<ChannelType.AnnouncementThread>,\n\t\t]\n\t> {}\n\n/**\n * Sample Implementation of a structure for announcement threads, usable by direct end consumers.\n */\nexport class AnnouncementThreadChannel<Omitted extends keyof APIAnnouncementThreadChannel | '' = ''> extends Channel<\n\tChannelType.AnnouncementThread,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIAnnouncementThreadChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData?.(data);\n\t}\n}\n\nMixin(AnnouncementThreadChannel, [\n\tTextChannelMixin,\n\tChannelOwnerMixin,\n\tChannelParentMixin,\n\tChannelPinMixin,\n\tChannelSlowmodeMixin,\n\tGuildChannelMixin,\n\tThreadChannelMixin,\n]);\n","import type { APIGuildCategoryChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { GuildChannelMixin } from './mixins/GuildChannelMixin.js';\n\nexport interface CategoryChannel<Omitted extends keyof APIGuildCategoryChannel | '' = ''>\n\textends MixinTypes<\n\t\tChannel<ChannelType.GuildCategory>,\n\t\t[ChannelPermissionMixin<ChannelType.GuildCategory>, GuildChannelMixin<ChannelType.GuildCategory>]\n\t> {}\n\n/**\n * Sample Implementation of a structure for category channels, usable by direct end consumers.\n */\nexport class CategoryChannel<Omitted extends keyof APIGuildCategoryChannel | '' = ''> extends Channel<\n\tChannelType.GuildCategory,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIGuildCategoryChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(CategoryChannel, [ChannelPermissionMixin, GuildChannelMixin]);\n","import type { APIDMChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelPinMixin } from './mixins/ChannelPinMixin.js';\nimport { DMChannelMixin } from './mixins/DMChannelMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\n\nexport interface DMChannel<Omitted extends keyof APIDMChannel | '' = ''>\n\textends MixinTypes<\n\t\tChannel<ChannelType.DM>,\n\t\t[DMChannelMixin<ChannelType.DM>, TextChannelMixin<ChannelType.DM>, ChannelPinMixin<ChannelType.DM>]\n\t> {}\n\n/**\n * Sample Implementation of a structure for dm channels, usable by direct end consumers.\n */\nexport class DMChannel<Omitted extends keyof APIDMChannel | '' = ''> extends Channel<ChannelType.DM, Omitted> {\n\tpublic constructor(data: Partialize<APIDMChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(DMChannel, [DMChannelMixin, TextChannelMixin, ChannelPinMixin]);\n","import type { APIGuildForumChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { ChannelTopicMixin } from './mixins/ChannelTopicMixin.js';\nimport { ThreadOnlyChannelMixin } from './mixins/ThreadOnlyChannelMixin.js';\n\nexport interface ForumChannel<Omitted extends keyof APIGuildForumChannel | '' = ''>\n\textends MixinTypes<\n\t\tChannel<ChannelType.GuildForum>,\n\t\t[\n\t\t\tChannelParentMixin<ChannelType.GuildForum>,\n\t\t\tChannelPermissionMixin<ChannelType.GuildForum>,\n\t\t\tChannelTopicMixin<ChannelType.GuildForum>,\n\t\t\tThreadOnlyChannelMixin<ChannelType.GuildForum>,\n\t\t]\n\t> {}\n\n/**\n * Sample Implementation of a structure for forum channels, usable by direct end consumers.\n */\nexport class ForumChannel<Omitted extends keyof APIGuildForumChannel | '' = ''> extends Channel<\n\tChannelType.GuildForum,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIGuildForumChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n\n\t/**\n\t * The default forum layout view used to display posts in this channel.\n\t * Defaults to 0, which indicates a layout view has not been set by a channel admin.\n\t */\n\tpublic get defaultForumLayout() {\n\t\treturn this[kData].default_forum_layout;\n\t}\n}\n\nMixin(ForumChannel, [ChannelParentMixin, ChannelPermissionMixin, ChannelTopicMixin, ThreadOnlyChannelMixin]);\n","import type { APIGroupDMChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelOwnerMixin } from './mixins/ChannelOwnerMixin.js';\nimport { DMChannelMixin } from './mixins/DMChannelMixin.js';\nimport { GroupDMMixin } from './mixins/GroupDMMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\n\nexport interface GroupDMChannel<Omitted extends keyof APIGroupDMChannel | '' = ''>\n\textends MixinTypes<\n\t\tChannel<ChannelType.GroupDM>,\n\t\t[\n\t\t\tDMChannelMixin<ChannelType.GroupDM>,\n\t\t\tTextChannelMixin<ChannelType.GroupDM>,\n\t\t\tChannelOwnerMixin<ChannelType.GroupDM>,\n\t\t\tGroupDMMixin,\n\t\t]\n\t> {}\n\n/**\n * Sample Implementation of a structure for group dm channels, usable by direct end consumers.\n */\nexport class GroupDMChannel<Omitted extends keyof APIGroupDMChannel | '' = ''> extends Channel<\n\tChannelType.GroupDM,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIGroupDMChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(GroupDMChannel, [DMChannelMixin, TextChannelMixin, ChannelOwnerMixin, GroupDMMixin]);\n","import type { APIGuildMediaChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { ChannelTopicMixin } from './mixins/ChannelTopicMixin.js';\nimport { ThreadOnlyChannelMixin } from './mixins/ThreadOnlyChannelMixin.js';\n\nexport interface MediaChannel<Omitted extends keyof APIGuildMediaChannel | '' = ''>\n\textends MixinTypes<\n\t\tChannel<ChannelType.GuildMedia>,\n\t\t[\n\t\t\tChannelParentMixin<ChannelType.GuildMedia>,\n\t\t\tChannelPermissionMixin<ChannelType.GuildMedia>,\n\t\t\tChannelTopicMixin<ChannelType.GuildMedia>,\n\t\t\tThreadOnlyChannelMixin<ChannelType.GuildMedia>,\n\t\t]\n\t> {}\n\n/**\n * Sample Implementation of a structure for media channels, usable by direct end consumers.\n */\nexport class MediaChannel<Omitted extends keyof APIGuildMediaChannel | '' = ''> extends Channel<\n\tChannelType.GuildMedia,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIGuildMediaChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(MediaChannel, [ChannelParentMixin, ChannelPermissionMixin, ChannelTopicMixin, ThreadOnlyChannelMixin]);\n","import type { APIPrivateThreadChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelOwnerMixin } from './mixins/ChannelOwnerMixin.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPinMixin } from './mixins/ChannelPinMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\nimport { ThreadChannelMixin } from './mixins/ThreadChannelMixin.js';\n\nexport interface PrivateThreadChannel<Omitted extends keyof APIPrivateThreadChannel | '' = ''>\n\textends MixinTypes<\n\t\tChannel<ChannelType.PrivateThread>,\n\t\t[\n\t\t\tTextChannelMixin<ChannelType.PrivateThread>,\n\t\t\tChannelOwnerMixin<ChannelType.PrivateThread>,\n\t\t\tChannelParentMixin<ChannelType.PrivateThread>,\n\t\t\tChannelPinMixin<ChannelType.PrivateThread>,\n\t\t\tChannelSlowmodeMixin<ChannelType.PrivateThread>,\n\t\t\tThreadChannelMixin<ChannelType.PrivateThread>,\n\t\t]\n\t> {}\n\n/**\n * Sample Implementation of a structure for private thread channels, usable by direct end consumers.\n */\nexport class PrivateThreadChannel<Omitted extends keyof APIPrivateThreadChannel | '' = ''> extends Channel<\n\tChannelType.PrivateThread,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIPrivateThreadChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(PrivateThreadChannel, [\n\tTextChannelMixin,\n\tChannelOwnerMixin,\n\tChannelParentMixin,\n\tChannelPinMixin,\n\tChannelSlowmodeMixin,\n\tThreadChannelMixin,\n]);\n","import type { APIPublicThreadChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { AppliedTagsMixin } from './mixins/AppliedTagsMixin.js';\nimport { ChannelOwnerMixin } from './mixins/ChannelOwnerMixin.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPinMixin } from './mixins/ChannelPinMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\nimport { ThreadChannelMixin } from './mixins/ThreadChannelMixin.js';\n\nexport interface PublicThreadChannel<Omitted extends keyof APIPublicThreadChannel | '' = ''>\n\textends MixinTypes<\n\t\tChannel<ChannelType.PublicThread>,\n\t\t[\n\t\t\tTextChannelMixin<ChannelType.PublicThread>,\n\t\t\tChannelOwnerMixin<ChannelType.PublicThread>,\n\t\t\tChannelParentMixin<ChannelType.PublicThread>,\n\t\t\tChannelPinMixin<ChannelType.PublicThread>,\n\t\t\tChannelSlowmodeMixin<ChannelType.PublicThread>,\n\t\t\tThreadChannelMixin<ChannelType.PublicThread>,\n\t\t\tAppliedTagsMixin,\n\t\t]\n\t> {}\n\n/**\n * Sample Implementation of a structure for public thread channels, usable by direct end consumers.\n */\nexport class PublicThreadChannel<Omitted extends keyof APIPublicThreadChannel | '' = ''> extends Channel<\n\tChannelType.PublicThread,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIPublicThreadChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(PublicThreadChannel, [\n\tTextChannelMixin,\n\tChannelOwnerMixin,\n\tChannelParentMixin,\n\tChannelPinMixin,\n\tChannelSlowmodeMixin,\n\tThreadChannelMixin,\n\tAppliedTagsMixin,\n]);\n","import type { APIGuildStageVoiceChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { ChannelWebhookMixin } from './mixins/ChannelWebhookMixin.js';\nimport { VoiceChannelMixin } from './mixins/VoiceChannelMixin.js';\n\nexport interface StageChannel<Omitted extends keyof APIGuildStageVoiceChannel | '' = ''>\n\textends MixinTypes<\n\t\tChannel<ChannelType.GuildStageVoice>,\n\t\t[\n\t\t\tChannelParentMixin<ChannelType.GuildStageVoice>,\n\t\t\tChannelPermissionMixin<ChannelType.GuildStageVoice>,\n\t\t\tChannelSlowmodeMixin<ChannelType.GuildStageVoice>,\n\t\t\tChannelWebhookMixin<ChannelType.GuildStageVoice>,\n\t\t\tVoiceChannelMixin<ChannelType.GuildStageVoice>,\n\t\t]\n\t> {}\n\nexport class StageChannel<Omitted extends keyof APIGuildStageVoiceChannel | '' = ''> extends Channel<\n\tChannelType.GuildStageVoice,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIGuildStageVoiceChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(StageChannel, [\n\tChannelParentMixin,\n\tChannelPermissionMixin,\n\tChannelSlowmodeMixin,\n\tChannelWebhookMixin,\n\tVoiceChannelMixin,\n]);\n","import type { APITextChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { ChannelPinMixin } from './mixins/ChannelPinMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { ChannelTopicMixin } from './mixins/ChannelTopicMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\n\nexport interface TextChannel<Omitted extends keyof APITextChannel | '' = ''>\n\textends MixinTypes<\n\t\tChannel<ChannelType.GuildText>,\n\t\t[\n\t\t\tTextChannelMixin<ChannelType.GuildText>,\n\t\t\tChannelParentMixin<ChannelType.GuildText>,\n\t\t\tChannelPermissionMixin<ChannelType.GuildText>,\n\t\t\tChannelPinMixin<ChannelType.GuildText>,\n\t\t\tChannelSlowmodeMixin<ChannelType.GuildText>,\n\t\t\tChannelTopicMixin<ChannelType.GuildText>,\n\t\t]\n\t> {}\n\nexport class TextChannel<Omitted extends keyof APITextChannel | '' = ''> extends Channel<\n\tChannelType.GuildText,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APITextChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(TextChannel, [\n\tTextChannelMixin,\n\tChannelParentMixin,\n\tChannelPermissionMixin,\n\tChannelPinMixin,\n\tChannelSlowmodeMixin,\n\tChannelTopicMixin,\n]);\n","import type { APIGuildVoiceChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { ChannelWebhookMixin } from './mixins/ChannelWebhookMixin.js';\nimport { VoiceChannelMixin } from './mixins/VoiceChannelMixin.js';\n\nexport interface VoiceChannel<Omitted extends keyof APIGuildVoiceChannel | '' = ''>\n\textends MixinTypes<\n\t\tChannel<ChannelType.GuildVoice>,\n\t\t[\n\t\t\tChannelParentMixin<ChannelType.GuildVoice>,\n\t\t\tChannelPermissionMixin<ChannelType.GuildVoice>,\n\t\t\tChannelSlowmodeMixin<ChannelType.GuildVoice>,\n\t\t\tChannelWebhookMixin<ChannelType.GuildVoice>,\n\t\t\tVoiceChannelMixin<ChannelType.GuildVoice>,\n\t\t]\n\t> {}\n\nexport class VoiceChannel<Omitted extends keyof APIGuildVoiceChannel | '' = ''> extends Channel<\n\tChannelType.GuildVoice,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIGuildVoiceChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(VoiceChannel, [\n\tChannelParentMixin,\n\tChannelPermissionMixin,\n\tChannelSlowmodeMixin,\n\tChannelWebhookMixin,\n\tVoiceChannelMixin,\n]);\n","import { type APIInvite, type APIExtendedInvite, RouteBases } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData, kExpiresTimestamp, kCreatedTimestamp, kPatch } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\nexport interface APIActualInvite extends APIInvite, Partial<Omit<APIExtendedInvite, keyof APIInvite>> {}\n\n/**\n * Represents an invitation to a Discord channel\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class Invite<Omitted extends keyof APIActualInvite | '' = 'created_at' | 'expires_at'> extends Structure<\n\tAPIActualInvite,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each Invite\n\t *\n\t * @remarks This template has defaults, if you want to remove additional data and keep the defaults,\n\t * use `Object.defineProperties`. To override the defaults, set this value directly.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIActualInvite> = {\n\t\tset created_at(_: string) {},\n\t\tset expires_at(_: string) {},\n\t};\n\n\t/**\n\t * Optimized storage of {@link discord-api-types/v10#(APIActualInvite:interface).expires_at}\n\t *\n\t * @internal\n\t */\n\tprotected [kExpiresTimestamp]: number | null = null;\n\n\t/**\n\t * Optimized storage of {@link discord-api-types/v10#(APIActualInvite:interface).created_at}\n\t *\n\t * @internal\n\t */\n\tprotected [kCreatedTimestamp]: number | null = null;\n\n\t/**\n\t * @param data - The raw data received from the API for the invite\n\t */\n\tpublic constructor(data: Partialize<APIActualInvite, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.[kPatch]}\n\t *\n\t * @internal\n\t */\n\tpublic override [kPatch](data: Partial<APIActualInvite>) {\n\t\tsuper[kPatch](data);\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.optimizeData}\n\t *\n\t * @internal\n\t */\n\tprotected override optimizeData(data: Partial<APIActualInvite>) {\n\t\tif (data.expires_at) {\n\t\t\tthis[kExpiresTimestamp] = Date.parse(data.expires_at);\n\t\t}\n\n\t\tif (data.created_at) {\n\t\t\tthis[kCreatedTimestamp] = Date.parse(data.created_at);\n\t\t}\n\t}\n\n\t/**\n\t * The code for this invite\n\t */\n\tpublic get code() {\n\t\treturn this[kData].code;\n\t}\n\n\t/**\n\t * The target type (for voice channel invites)\n\t */\n\tpublic get targetType() {\n\t\treturn this[kData].target_type;\n\t}\n\n\t/**\n\t * The type of this invite\n\t */\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n\n\t/**\n\t * The approximate number of online members of the guild this invite is for\n\t *\n\t * @remarks Only available when the invite was fetched from `GET /invites/<code>` with counts\n\t */\n\tpublic get approximatePresenceCount() {\n\t\treturn this[kData].approximate_presence_count;\n\t}\n\n\t/**\n\t * The approximate total number of members of the guild this invite is for\n\t *\n\t * @remarks Only available when the invite was fetched from `GET /invites/<code>` with counts\n\t */\n\tpublic get approximateMemberCount() {\n\t\treturn this[kData].approximate_member_count;\n\t}\n\n\t/**\n\t * The timestamp this invite will expire at\n\t */\n\tpublic get expiresTimestamp() {\n\t\tif (this[kExpiresTimestamp]) {\n\t\t\treturn this[kExpiresTimestamp];\n\t\t}\n\n\t\tconst createdTimestamp = this.createdTimestamp;\n\t\tconst maxAge = this.maxAge;\n\t\tif (createdTimestamp && maxAge) {\n\t\t\tthis[kExpiresTimestamp] = createdTimestamp + (maxAge as number) * 1_000;\n\t\t}\n\n\t\treturn this[kExpiresTimestamp];\n\t}\n\n\t/**\n\t * The time the invite will expire at\n\t */\n\tpublic get expiresAt() {\n\t\tconst expiresTimestamp = this.expiresTimestamp;\n\t\treturn expiresTimestamp ? new Date(expiresTimestamp) : null;\n\t}\n\n\t/**\n\t * The number of times this invite has been used\n\t */\n\tpublic get uses() {\n\t\treturn this[kData].uses;\n\t}\n\n\t/**\n\t * The maximum number of times this invite can be used\n\t */\n\tpublic get maxUses() {\n\t\treturn this[kData].max_uses;\n\t}\n\n\t/**\n\t * The maximum age of the invite, in seconds, 0 for non-expiring\n\t */\n\tpublic get maxAge() {\n\t\treturn this[kData].max_age;\n\t}\n\n\t/**\n\t * Whether this invite only grants temporary membership\n\t */\n\tpublic get temporary() {\n\t\treturn this[kData].temporary;\n\t}\n\n\t/**\n\t * The timestamp this invite was created at\n\t */\n\tpublic get createdTimestamp() {\n\t\treturn this[kCreatedTimestamp];\n\t}\n\n\t/**\n\t * The time the invite was created at\n\t */\n\tpublic get createdAt() {\n\t\tconst createdTimestamp = this.createdTimestamp;\n\t\treturn createdTimestamp ? new Date(createdTimestamp) : null;\n\t}\n\n\t/**\n\t * The URL to the invite\n\t */\n\tpublic get url() {\n\t\treturn this.code ? `${RouteBases.invite}/${this.code}` : null;\n\t}\n\n\t/**\n\t * When concatenated with a string, this automatically concatenates the invite's URL instead of the object.\n\t *\n\t * @returns The URL to the invite or an empty string if it doesn't have a code\n\t */\n\tpublic override toString() {\n\t\treturn this.url ?? '';\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.toJSON}\n\t */\n\tpublic override toJSON() {\n\t\tconst clone = super.toJSON();\n\t\tif (this[kExpiresTimestamp]) {\n\t\t\tclone.expires_at = new Date(this[kExpiresTimestamp]).toISOString();\n\t\t}\n\n\t\tif (this[kCreatedTimestamp]) {\n\t\t\tclone.created_at = new Date(this[kCreatedTimestamp]).toISOString();\n\t\t}\n\n\t\treturn clone;\n\t}\n\n\t/**\n\t * Returns the primitive value of the specified object.\n\t */\n\tpublic override valueOf() {\n\t\treturn this.code ?? super.valueOf();\n\t}\n}\n","import type { APIAvatarDecorationData } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents metadata of an avatar decoration of a User.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class AvatarDecorationData<Omitted extends keyof APIAvatarDecorationData | '' = ''> extends Structure<\n\tAPIAvatarDecorationData,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each Connection\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIAvatarDecorationData> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIAvatarDecorationData, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the SKU this avatar decoration is part of.\n\t */\n\tpublic get skuId() {\n\t\treturn this[kData].sku_id;\n\t}\n\n\t/**\n\t * The asset of this avatar decoration.\n\t */\n\tpublic get asset() {\n\t\treturn this[kData].asset;\n\t}\n}\n","import { DiscordSnowflake } from '@sapphire/snowflake';\nimport type { APIUser } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData, kPatch } from '../utils/symbols.js';\nimport { isIdSet } from '../utils/type-guards.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents any user on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has a substructure `AvatarDecorationData`, which needs to be instantiated and stored by an extending class using it\n */\nexport class User<Omitted extends keyof APIUser | '' = ''> extends Structure<APIUser, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each User\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIUser> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the user\n\t */\n\tpublic constructor(data: Partialize<APIUser, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.[kPatch]}\n\t *\n\t * @internal\n\t */\n\tpublic override [kPatch](data: Partial<APIUser>) {\n\t\treturn super[kPatch](data);\n\t}\n\n\t/**\n\t * The user's id\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The username of the user\n\t */\n\tpublic get username() {\n\t\treturn this[kData].username;\n\t}\n\n\t/**\n\t * The user's 4 digit tag, if a bot\n\t */\n\tpublic get discriminator() {\n\t\treturn this[kData].discriminator;\n\t}\n\n\t/**\n\t * The user's display name, the application name for bots\n\t */\n\tpublic get globalName() {\n\t\treturn this[kData].global_name;\n\t}\n\n\t/**\n\t * The name displayed in the client for this user when no nickname is set\n\t */\n\tpublic get displayName() {\n\t\treturn this.globalName ?? this.username;\n\t}\n\n\t/**\n\t * The user avatar's hash\n\t */\n\tpublic get avatar() {\n\t\treturn this[kData].avatar;\n\t}\n\n\t/**\n\t * Whether the user is a bot\n\t */\n\tpublic get bot() {\n\t\treturn this[kData].bot ?? false;\n\t}\n\n\t/**\n\t * Whether the user is an Official Discord System user\n\t */\n\tpublic get system() {\n\t\treturn this[kData].system ?? false;\n\t}\n\n\t/**\n\t * Whether the user has mfa enabled\n\t *\n\t * @remarks This property is only set when the user was fetched with an OAuth2 token and the `identify` scope\n\t */\n\tpublic get mfaEnabled() {\n\t\treturn this[kData].mfa_enabled;\n\t}\n\n\t/**\n\t * The user's banner hash\n\t *\n\t * @remarks This property is only set when the user was manually fetched\n\t */\n\tpublic get banner() {\n\t\treturn this[kData].banner;\n\t}\n\n\t/**\n\t * The base 10 accent color of the user's banner\n\t *\n\t * @remarks This property is only set when the user was manually fetched\n\t */\n\tpublic get accentColor() {\n\t\treturn this[kData].accent_color;\n\t}\n\n\t/**\n\t * The user's primary Discord language\n\t *\n\t * @remarks This property is only set when the user was fetched with an Oauth2 token and the `identify` scope\n\t */\n\tpublic get locale() {\n\t\treturn this[kData].locale;\n\t}\n\n\t/**\n\t * Whether the email on the user's account has been verified\n\t *\n\t * @remarks This property is only set when the user was fetched with an OAuth2 token and the `email` scope\n\t */\n\tpublic get verified() {\n\t\treturn this[kData].verified;\n\t}\n\n\t/**\n\t * The user's email\n\t *\n\t * @remarks This property is only set when the user was fetched with an OAuth2 token and the `email` scope\n\t */\n\tpublic get email() {\n\t\treturn this[kData].email;\n\t}\n\n\t/**\n\t * The type of nitro subscription on the user's account\n\t *\n\t * @remarks This property is only set when the user was fetched with an OAuth2 token and the `identify` scope\n\t */\n\tpublic get premiumType() {\n\t\treturn this[kData].premium_type;\n\t}\n\n\t/**\n\t * The timestamp the user was created at\n\t */\n\tpublic get createdTimestamp() {\n\t\treturn isIdSet(this.id) ? DiscordSnowflake.timestampFrom(this.id) : null;\n\t}\n\n\t/**\n\t * The time the user was created at\n\t */\n\tpublic get createdAt() {\n\t\tconst createdTimestamp = this.createdTimestamp;\n\t\treturn createdTimestamp ? new Date(createdTimestamp) : null;\n\t}\n\n\t/**\n\t * The hexadecimal version of the user accent color, with a leading hash\n\t *\n\t * @remarks This property is only set when the user was manually fetched\n\t */\n\tpublic get hexAccentColor() {\n\t\tconst accentColor = this.accentColor;\n\t\tif (typeof accentColor !== 'number') return accentColor;\n\t\treturn `#${accentColor.toString(16).padStart(6, '0')}`;\n\t}\n}\n","import type { APIConnection } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData, kPatch } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents a user's connection on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class Connection<Omitted extends keyof APIConnection | '' = ''> extends Structure<APIConnection, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each Connection\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIConnection> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIConnection, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.[kPatch]}\n\t *\n\t * @internal\n\t */\n\tpublic override [kPatch](data: Partial<APIConnection>) {\n\t\treturn super[kPatch](data);\n\t}\n\n\t/**\n\t * The id of the connection account\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The username of the connection account\n\t */\n\tpublic get name() {\n\t\treturn this[kData].name;\n\t}\n\n\t/**\n\t * The type of service this connection is for\n\t */\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n\n\t/**\n\t * Whether the connection is revoked\n\t */\n\tpublic get revoked() {\n\t\treturn this[kData].revoked ?? false;\n\t}\n\n\t/**\n\t * Whether the connection is verified\n\t */\n\tpublic get verified() {\n\t\treturn this[kData].verified;\n\t}\n\n\t/**\n\t * Whether friend sync is enabled for this connection\n\t */\n\tpublic get friendSync() {\n\t\treturn this[kData].friend_sync;\n\t}\n\n\t/**\n\t * Whether activities related to this connection are shown in the users presence\n\t */\n\tpublic get showActivity() {\n\t\treturn this[kData].show_activity;\n\t}\n\n\t/**\n\t * Whether this connection has an Oauth2 token for console voice transfer\n\t */\n\tpublic get twoWayLink() {\n\t\treturn this[kData].two_way_link;\n\t}\n\n\t/**\n\t * The visibility state for this connection\n\t */\n\tpublic get visibility() {\n\t\treturn this[kData].visibility;\n\t}\n}\n","export function extendTemplate<SuperTemplate extends Record<string, unknown>>(\n\tsuperTemplate: SuperTemplate,\n\tadditions: Record<string, unknown>,\n): Record<string, unknown> & SuperTemplate {\n\treturn Object.defineProperties(additions, Object.getOwnPropertyDescriptors(superTemplate)) as Record<\n\t\tstring,\n\t\tunknown\n\t> &\n\t\tSuperTemplate;\n}\n"],"mappings":";;;;AAsBO,IAAe,WAAf,MAAe,UAA+B;AAAA,EAtBrD,OAsBqD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpD,OAAuB,QAA4C,CAAC;AAAA,EAEpE,OAAuB,aAAqB;AAAA;AAAA;AAAA;AAAA,EAKrC;AAAA;AAAA;AAAA;AAAA,EAOA,YAAY,OAAkC,KAAK,YAAY,YAAY;AACjF,SAAK,WAAW,KAAK,YAAY,QAAQ,IAAI;AAAA,EAC9C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,IAAI,KAAgC;AAC1C,YAAQ,KAAK,WAAW,KAAK,YAAY,QAAQ,GAAG,OAAO,KAAK,YAAY;AAAA,EAC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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAIhH,OAAgC,eAAuC,CAAC;AAAA;AAAA;AAAA;AAAA,EAKjE,YAAY,MAA0C;AAC5D,UAAM,IAAI;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,CAAiB,MAAM,EAAE,MAA8B;AACtD,WAAO,MAAM,MAAM,EAAE,IAAI;AAAA,EAC1B;AAAA;AAAA;AAAA;AAAA,EAKA,IAAW,KAAK;AACf,WAAO,KAAK,KAAK,EAAE;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAW,OAAO;AACjB,WAAO,KAAK,KAAK,EAAE;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAW,OAAO;AACjB,WAAO,KAAK,KAAK,EAAE;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAW,UAAU;AACpB,WAAO,KAAK,KAAK,EAAE,WAAW;AAAA,EAC/B;AAAA;AAAA;AAAA;AAAA,EAKA,IAAW,WAAW;AACrB,WAAO,KAAK,KAAK,EAAE;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAW,aAAa;AACvB,WAAO,KAAK,KAAK,EAAE;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAW,eAAe;AACzB,WAAO,KAAK,KAAK,EAAE;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAW,aAAa;AACvB,WAAO,KAAK,KAAK,EAAE;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAW,aAAa;AACvB,WAAO,KAAK,KAAK,EAAE;AAAA,EACpB;AACD;;;AC9FO,SAAS,eACf,eACA,WAC0C;AAC1C,SAAO,OAAO,iBAAiB,WAAW,OAAO,0BAA0B,aAAa,CAAC;AAK1F;AATgB;","names":["channelLink","channelLink","DiscordSnowflake","DiscordSnowflake"]}
1
+ {"version":3,"sources":["../src/bitfields/BitField.ts","../src/bitfields/AttachmentFlagsBitField.ts","../src/bitfields/ChannelFlagsBitField.ts","../src/bitfields/MessageFlagsBitField.ts","../src/bitfields/PermissionsBitField.ts","../src/utils/symbols.ts","../src/channels/mixins/AppliedTagsMixin.ts","../src/channels/mixins/ChannelOwnerMixin.ts","../src/channels/mixins/GuildChannelMixin.ts","../src/channels/mixins/ChannelParentMixin.ts","../src/channels/mixins/ChannelPermissionMixin.ts","../src/channels/mixins/ChannelPinMixin.ts","../src/channels/mixins/TextChannelMixin.ts","../src/channels/mixins/ChannelSlowmodeMixin.ts","../src/channels/mixins/ChannelWebhookMixin.ts","../src/channels/mixins/ChannelTopicMixin.ts","../src/channels/mixins/DMChannelMixin.ts","../src/channels/mixins/GroupDMMixin.ts","../src/channels/mixins/ThreadChannelMixin.ts","../src/channels/mixins/ThreadOnlyChannelMixin.ts","../src/channels/mixins/VoiceChannelMixin.ts","../src/Structure.ts","../src/channels/ForumTag.ts","../src/channels/PermissionOverwrite.ts","../src/channels/ThreadMetadata.ts","../src/channels/Channel.ts","../src/utils/type-guards.ts","../src/Mixin.ts","../src/channels/AnnouncementChannel.ts","../src/channels/AnnouncementThreadChannel.ts","../src/channels/CategoryChannel.ts","../src/channels/DMChannel.ts","../src/channels/ForumChannel.ts","../src/channels/GroupDMChannel.ts","../src/channels/MediaChannel.ts","../src/channels/PrivateThreadChannel.ts","../src/channels/PublicThreadChannel.ts","../src/channels/StageChannel.ts","../src/channels/TextChannel.ts","../src/channels/VoiceChannel.ts","../src/interactions/ResolvedInteractionData.ts","../src/invites/Invite.ts","../src/utils/optimization.ts","../src/messages/components/Component.ts","../src/messages/components/ActionRowComponent.ts","../src/messages/components/ButtonComponent.ts","../src/messages/components/SelectMenuComponent.ts","../src/messages/components/ChannelSelectMenuComponent.ts","../src/messages/components/ContainerComponent.ts","../src/messages/components/FileComponent.ts","../src/messages/components/FileUploadComponent.ts","../src/messages/components/LabeledButtonComponent.ts","../src/messages/components/InteractiveButtonComponent.ts","../src/messages/components/LinkButtonComponent.ts","../src/messages/components/MediaGalleryComponent.ts","../src/messages/components/MentionableSelectMenuComponent.ts","../src/messages/components/PremiumButtonComponent.ts","../src/messages/components/RoleSelectMenuComponent.ts","../src/messages/components/SectionComponent.ts","../src/messages/components/SeparatorComponent.ts","../src/messages/components/StringSelectMenuComponent.ts","../src/messages/components/TextDisplayComponent.ts","../src/messages/components/TextInputComponent.ts","../src/messages/components/ThumbnailComponent.ts","../src/messages/components/UserSelectMenuComponent.ts","../src/messages/components/ComponentEmoji.ts","../src/messages/components/MediaGalleryItem.ts","../src/messages/components/SelectMenuDefaultValue.ts","../src/messages/components/StringSelectMenuOption.ts","../src/messages/components/UnfurledMediaItem.ts","../src/messages/embeds/Embed.ts","../src/messages/embeds/EmbedAuthor.ts","../src/messages/embeds/EmbedField.ts","../src/messages/embeds/EmbedFooter.ts","../src/messages/embeds/EmbedImage.ts","../src/messages/embeds/EmbedProvider.ts","../src/messages/embeds/EmbedThumbnail.ts","../src/messages/embeds/EmbedVideo.ts","../src/messages/InteractionMetadata.ts","../src/messages/ApplicationCommandInteractionMetadata.ts","../src/messages/Attachment.ts","../src/messages/ChannelMention.ts","../src/messages/Message.ts","../src/messages/MessageActivity.ts","../src/messages/MessageCall.ts","../src/messages/MessageComponentInteractionMetadata.ts","../src/messages/MessageReference.ts","../src/messages/ModalSubmitInteractionMetadata.ts","../src/messages/Reaction.ts","../src/messages/ReactionCountDetails.ts","../src/messages/RoleSubscriptionData.ts","../src/polls/Poll.ts","../src/polls/PollAnswer.ts","../src/polls/PollAnswerCount.ts","../src/polls/PollMedia.ts","../src/polls/PollResults.ts","../src/stickers/Sticker.ts","../src/users/AvatarDecorationData.ts","../src/users/User.ts","../src/users/Connection.ts"],"sourcesContent":["import type { EnumLike, NonAbstract, RecursiveReadonlyArray } from '../utils/types.js';\n\n// TODO: this currently is mostly copied from mainlib discord.js v14 and definitely needs a refactor in a later iteration\n\n/**\n * Data that can be resolved to give a bit field. This can be:\n * A bit number (this can be a number literal or a value taken from {@link (BitField:class).Flags})\n * A string bit number\n * An instance of BitField\n * An Array of BitFieldResolvable\n */\nexport type BitFieldResolvable<Flags extends string> =\n\t| Flags\n\t| Readonly<BitField<Flags>>\n\t| RecursiveReadonlyArray<Flags | Readonly<BitField<Flags>> | bigint | number | `${bigint}`>\n\t| bigint\n\t| number\n\t| `${bigint}`;\n\n/**\n * Data structure that makes it easy to interact with a bit field.\n */\nexport abstract class BitField<Flags extends string> {\n\t/**\n\t * Numeric bit field flags.\n\t *\n\t * @remarks Defined in extension classes\n\t */\n\tpublic static readonly Flags: EnumLike<unknown, bigint | number> = {};\n\n\tpublic static readonly DefaultBit: bigint = 0n;\n\n\t/**\n\t * Bitfield of the packed bits\n\t */\n\tpublic bitField: bigint;\n\n\tdeclare public ['constructor']: NonAbstract<typeof BitField<Flags>>;\n\n\t/**\n\t * @param bits - Bit(s) to read from\n\t */\n\tpublic constructor(bits: BitFieldResolvable<Flags> = this.constructor.DefaultBit) {\n\t\tthis.bitField = this.constructor.resolve(bits);\n\t}\n\n\t/**\n\t * Checks whether the bit field has a bit, or any of multiple bits.\n\t *\n\t * @param bit - Bit(s) to check for\n\t * @returns Whether the bit field has the bit(s)\n\t */\n\tpublic any(bit: BitFieldResolvable<Flags>) {\n\t\treturn (this.bitField & this.constructor.resolve(bit)) !== this.constructor.DefaultBit;\n\t}\n\n\t/**\n\t * Checks if this bit field equals another\n\t *\n\t * @param bit - Bit(s) to check for\n\t * @returns Whether this bit field equals the other\n\t */\n\tpublic equals(bit: BitFieldResolvable<Flags>) {\n\t\treturn this.bitField === this.constructor.resolve(bit);\n\t}\n\n\t/**\n\t * Checks whether the bit field has a bit, or multiple bits.\n\t *\n\t * @param bit - Bit(s) to check for\n\t * @returns Whether the bit field has the bit(s)\n\t */\n\tpublic has(bit: BitFieldResolvable<Flags>, ..._hasParams: unknown[]) {\n\t\tconst resolvedBit = this.constructor.resolve(bit);\n\t\treturn (this.bitField & resolvedBit) === resolvedBit;\n\t}\n\n\t/**\n\t * Gets all given bits that are missing from the bit field.\n\t *\n\t * @param bits - Bit(s) to check for\n\t * @param hasParams - Additional parameters for the has method, if any\n\t * @returns A bit field containing the missing bits\n\t */\n\tpublic missing(bits: BitFieldResolvable<Flags>, ...hasParams: readonly unknown[]) {\n\t\treturn new this.constructor(bits).remove(this).toArray(...hasParams);\n\t}\n\n\t/**\n\t * Freezes these bits, making them immutable.\n\t *\n\t * @returns This bit field but frozen\n\t */\n\tpublic freeze() {\n\t\treturn Object.freeze(this);\n\t}\n\n\t/**\n\t * Adds bits to these ones.\n\t *\n\t * @param bits - Bits to add\n\t * @returns These bits or new BitField if the instance is frozen.\n\t */\n\tpublic add(...bits: BitFieldResolvable<Flags>[]) {\n\t\tlet total = this.constructor.DefaultBit;\n\t\tfor (const bit of bits) {\n\t\t\ttotal |= this.constructor.resolve(bit);\n\t\t}\n\n\t\tif (Object.isFrozen(this)) return new this.constructor(this.bitField | total);\n\t\tthis.bitField |= total;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes bits from these.\n\t *\n\t * @param bits - Bits to remove\n\t * @returns These bits or new BitField if the instance is frozen.\n\t */\n\tpublic remove(...bits: BitFieldResolvable<Flags>[]) {\n\t\tlet total = this.constructor.DefaultBit;\n\t\tfor (const bit of bits) {\n\t\t\ttotal |= this.constructor.resolve(bit);\n\t\t}\n\n\t\tif (Object.isFrozen(this)) return new this.constructor(this.bitField & ~total);\n\t\tthis.bitField &= ~total;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Gets an object mapping field names to a boolean indicating whether the bit is available.\n\t *\n\t * @param hasParams - Additional parameters for the has method, if any\n\t * @returns An object mapping field names to a boolean indicating whether the bit is available\n\t */\n\tpublic serialize(...hasParams: readonly unknown[]) {\n\t\tconst serialized: Partial<Record<keyof Flags, boolean>> = {};\n\t\tfor (const [flag, bit] of Object.entries(this.constructor.Flags)) {\n\t\t\tif (Number.isNaN(Number(flag))) serialized[flag as keyof Flags] = this.has(bit as bigint | number, ...hasParams);\n\t\t}\n\n\t\treturn serialized;\n\t}\n\n\t/**\n\t * Gets an Array of bit field names based on the bits available.\n\t *\n\t * @param hasParams - Additional parameters for the has method, if any\n\t * @returns An Array of bit field names\n\t */\n\tpublic toArray(...hasParams: readonly unknown[]) {\n\t\treturn [...this[Symbol.iterator](...hasParams)];\n\t}\n\n\tpublic toJSON(asNumber?: boolean) {\n\t\tif (asNumber) {\n\t\t\tif (this.bitField > Number.MAX_SAFE_INTEGER) {\n\t\t\t\tthrow new RangeError(\n\t\t\t\t\t`Cannot convert bitfield value ${this.bitField} to number, as it is bigger than ${Number.MAX_SAFE_INTEGER} (the maximum safe integer)`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn Number(this.bitField);\n\t\t}\n\n\t\treturn this.bitField.toString();\n\t}\n\n\tpublic valueOf() {\n\t\treturn this.bitField;\n\t}\n\n\tpublic *[Symbol.iterator](...hasParams: unknown[]) {\n\t\tfor (const bitName of Object.keys(this.constructor.Flags)) {\n\t\t\tif (Number.isNaN(Number(bitName)) && this.has(bitName as Flags, ...hasParams)) yield bitName as Flags;\n\t\t}\n\t}\n\n\t/**\n\t * Resolves bit fields to their numeric form.\n\t *\n\t * @param bit - bit(s) to resolve\n\t * @returns the numeric value of the bit fields\n\t */\n\tpublic static resolve<Flags extends string = string>(bit: BitFieldResolvable<Flags>): bigint {\n\t\tconst DefaultBit = this.DefaultBit;\n\t\tif (typeof bit === 'bigint' && bit >= DefaultBit) return bit;\n\t\tif (typeof bit === 'number' && BigInt(bit) >= DefaultBit) return BigInt(bit);\n\t\tif (bit instanceof BitField) return bit.bitField;\n\t\tif (Array.isArray(bit)) {\n\t\t\treturn bit.map((bit_) => this.resolve(bit_)).reduce((prev, bit_) => prev | bit_, DefaultBit);\n\t\t}\n\n\t\tif (typeof bit === 'string') {\n\t\t\tif (!Number.isNaN(Number(bit))) return BigInt(bit);\n\t\t\tif (bit in this.Flags) return this.Flags[bit as keyof typeof this.Flags];\n\t\t}\n\n\t\tthrow new Error(`BitFieldInvalid: ${JSON.stringify(bit)}`);\n\t}\n}\n","import { AttachmentFlags } from 'discord-api-types/v10';\nimport { BitField } from './BitField.js';\n\n/**\n * Data structure that makes it easy to interact with a {@link Attachment#flags} bitfield.\n */\nexport class AttachmentFlagsBitField extends BitField<keyof AttachmentFlags> {\n\t/**\n\t * Numeric attachment flags.\n\t */\n\tpublic static override readonly Flags = AttachmentFlags;\n\n\tpublic override toJSON() {\n\t\treturn super.toJSON(true);\n\t}\n}\n","import { ChannelFlags } from 'discord-api-types/v10';\nimport { BitField } from './BitField.js';\n\n/**\n * Data structure that makes it easy to interact with a {@link (Channel:class).flags} bitfield.\n */\nexport class ChannelFlagsBitField extends BitField<keyof ChannelFlags> {\n\t/**\n\t * Numeric guild channel flags.\n\t */\n\tpublic static override readonly Flags = ChannelFlags;\n\n\tpublic override toJSON() {\n\t\treturn super.toJSON(true);\n\t}\n}\n","import { MessageFlags } from 'discord-api-types/v10';\nimport { BitField } from './BitField.js';\n\n/**\n * Data structure that makes it easy to interact with a {@link Message#flags} bitfield.\n */\nexport class MessageFlagsBitField extends BitField<keyof MessageFlags> {\n\t/**\n\t * Numeric message flags.\n\t */\n\tpublic static override readonly Flags = MessageFlags;\n\n\tpublic override toJSON() {\n\t\treturn super.toJSON(true);\n\t}\n}\n","/* eslint-disable unicorn/consistent-function-scoping */\nimport { PermissionFlagsBits } from 'discord-api-types/v10';\nimport type { BitFieldResolvable } from './BitField.js';\nimport { BitField } from './BitField.js';\n\n/**\n * Data structure that makes it easy to interact with a permission bit field. All {@link GuildMember}s have a set of\n * permissions in their guild, and each channel in the guild may also have {@link PermissionOverwrite}s for the member\n * that override their default permissions.\n */\nexport class PermissionsBitField extends BitField<keyof typeof PermissionFlagsBits> {\n\t/**\n\t * Numeric permission flags.\n\t *\n\t * @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags}\n\t */\n\tpublic static override Flags = PermissionFlagsBits;\n\n\t/**\n\t * Bit field representing every permission combined\n\t */\n\tpublic static readonly All = Object.values(PermissionFlagsBits).reduce((all, perm) => all | perm, 0n);\n\n\t/**\n\t * Bit field representing the default permissions for users\n\t */\n\tpublic static readonly Default = 104_324_673n;\n\n\t/**\n\t * Bit field representing the permissions required for moderators of stage channels\n\t */\n\tpublic static readonly StageModerator =\n\t\tPermissionFlagsBits.ManageChannels | PermissionFlagsBits.MuteMembers | PermissionFlagsBits.MoveMembers;\n\n\t/**\n\t * Gets all given bits that are missing from the bit field.\n\t *\n\t * @param bits - Bit(s) to check for\n\t * @param checkAdmin - Whether to allow the administrator permission to override\n\t * @returns A bit field containing the missing permissions\n\t */\n\tpublic override missing(bits: BitFieldResolvable<keyof typeof PermissionFlagsBits>, checkAdmin = true) {\n\t\treturn checkAdmin && this.has(PermissionFlagsBits.Administrator) ? [] : super.missing(bits);\n\t}\n\n\t/**\n\t * Checks whether the bit field has a permission, or any of multiple permissions.\n\t *\n\t * @param permission - Permission(s) to check for\n\t * @param checkAdmin - Whether to allow the administrator permission to override\n\t * @returns Whether the bit field has the permission(s)\n\t */\n\tpublic override any(permission: BitFieldResolvable<keyof typeof PermissionFlagsBits>, checkAdmin = true) {\n\t\treturn (checkAdmin && super.has(PermissionFlagsBits.Administrator)) || super.any(permission);\n\t}\n\n\t/**\n\t * Checks whether the bit field has a permission, or multiple permissions.\n\t *\n\t * @param permission - Permission(s) to check for\n\t * @param checkAdmin - Whether to allow the administrator permission to override\n\t * @returns Whether the bit field has the permission(s)\n\t */\n\tpublic override has(permission: BitFieldResolvable<keyof typeof PermissionFlagsBits>, checkAdmin = true) {\n\t\treturn (checkAdmin && super.has(PermissionFlagsBits.Administrator)) || super.has(permission);\n\t}\n\n\t/**\n\t * Gets an Array of bitfield names based on the permissions available.\n\t *\n\t * @returns An Array of permission names\n\t */\n\tpublic override toArray() {\n\t\treturn super.toArray(false);\n\t}\n}\n","export const kData = Symbol.for('djs.structures.data');\nexport const kClone = Symbol.for('djs.structures.clone');\nexport const kPatch = Symbol.for('djs.structures.patch');\nexport const kExpiresTimestamp = Symbol.for('djs.structures.expiresTimestamp');\nexport const kEndedTimestamp = Symbol.for('djs.structures.endedTimestamp');\nexport const kCreatedTimestamp = Symbol.for('djs.structures.createdTimestamp');\nexport const kEditedTimestamp = Symbol.for('djs.structures.editedTimestamp');\nexport const kArchiveTimestamp = Symbol.for('djs.structures.archiveTimestamp');\n\nexport const kAllow = Symbol.for('djs.structures.allow');\nexport const kDeny = Symbol.for('djs.structures.deny');\n\nexport const kBurstColors = Symbol.for('djs.structures.burstColors');\n\nexport const kLastPinTimestamp = Symbol.for('djs.structures.lastPinTimestamp');\n\nexport const kMixinConstruct = Symbol.for('djs.structures.mixin.construct');\nexport const kMixinToJSON = Symbol.for('djs.structures.mixin.toJSON');\n","import type { ChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface AppliedTagsMixin extends Channel<ChannelType.PublicThread> {}\n\nexport class AppliedTagsMixin {\n\t/**\n\t * The ids of the set of tags that have been applied to a thread in a {@link (ForumChannel:class)} or a {@link (MediaChannel:class)}.\n\t */\n\tpublic get appliedTags(): readonly string[] | null {\n\t\treturn Array.isArray(this[kData].applied_tags) ? this[kData].applied_tags : null;\n\t}\n}\n","import type { ChannelType, ThreadChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface ChannelOwnerMixin<Type extends ChannelType.GroupDM | ThreadChannelType> extends Channel<Type> {}\n\nexport class ChannelOwnerMixin<Type extends ChannelType.GroupDM | ThreadChannelType> {\n\t/**\n\t * The id of the creator of the group DM or thread\n\t */\n\tpublic get ownerId() {\n\t\treturn this[kData].owner_id;\n\t}\n}\n","import { channelLink } from '@discordjs/formatters';\nimport type { GuildChannelType } from 'discord-api-types/v10';\nimport { ChannelFlagsBitField } from '../../bitfields/ChannelFlagsBitField.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface GuildChannelMixin<Type extends GuildChannelType = GuildChannelType> extends Channel<Type> {}\n\nexport class GuildChannelMixin<Type extends GuildChannelType = GuildChannelType> {\n\t/**\n\t * The flags that are applied to the channel.\n\t *\n\t * @privateRemarks The type of `flags` can be narrowed in Guild Channels and DMChannel to ChannelFlags, and in GroupDM channel\n\t * to null, respecting Omit behaviors\n\t */\n\tpublic get flags() {\n\t\treturn this[kData].flags ? new ChannelFlagsBitField(this[kData].flags) : null;\n\t}\n\n\t/**\n\t * THe id of the guild this channel is in.\n\t */\n\tpublic get guildId() {\n\t\treturn this[kData].guild_id!;\n\t}\n\n\t/**\n\t * The URL to this channel.\n\t */\n\tpublic get url() {\n\t\treturn channelLink(this.id, this.guildId);\n\t}\n\n\t/**\n\t * Indicates whether this channel is in a guild\n\t */\n\tpublic isGuildBased(): this is GuildChannelMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { ChannelType, GuildChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport { GuildChannelMixin } from './GuildChannelMixin.js';\n\nexport class ChannelParentMixin<\n\tType extends Exclude<GuildChannelType, ChannelType.GuildCategory | ChannelType.GuildDirectory>,\n> extends GuildChannelMixin<Type> {\n\t/**\n\t * The id of the parent category for a channel (each parent category can contain up to 50 channels) or id of the parent channel for a thread\n\t */\n\tpublic get parentId() {\n\t\treturn this[kData].parent_id;\n\t}\n\n\t/**\n\t * Whether the channel is nsfw\n\t */\n\tpublic get nsfw() {\n\t\treturn this[kData].nsfw;\n\t}\n}\n","import type { ChannelType, GuildChannelType, ThreadChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface ChannelPermissionMixin<\n\tType extends Exclude<GuildChannelType, ChannelType.GuildDirectory | ThreadChannelType> = Exclude<\n\t\tGuildChannelType,\n\t\tChannelType.GuildDirectory | ThreadChannelType\n\t>,\n> extends Channel<Type> {}\n\n/**\n * @remarks has an array of sub-structures {@link PermissionOverwrite} that extending mixins should add to their DataTemplate and _optimizeData\n */\nexport class ChannelPermissionMixin<\n\tType extends Exclude<GuildChannelType, ChannelType.GuildDirectory | ThreadChannelType> = Exclude<\n\t\tGuildChannelType,\n\t\tChannelType.GuildDirectory | ThreadChannelType\n\t>,\n> {\n\t/**\n\t * The sorting position of the channel\n\t */\n\tpublic get position() {\n\t\treturn this[kData].position;\n\t}\n\n\t/**\n\t * Indicates whether this channel can have permission overwrites\n\t */\n\tpublic isPermissionCapable(): this is ChannelPermissionMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { ChannelType, ThreadChannelType } from 'discord-api-types/v10';\nimport { kLastPinTimestamp, kMixinConstruct, kMixinToJSON } from '../../utils/symbols.js';\nimport type { Channel, ChannelDataType } from '../Channel.js';\n\nexport interface ChannelPinMixin<\n\tType extends ChannelType.DM | ChannelType.GuildAnnouncement | ChannelType.GuildText | ThreadChannelType,\n> extends Channel<Type> {}\n\nexport class ChannelPinMixin<\n\tType extends ChannelType.DM | ChannelType.GuildAnnouncement | ChannelType.GuildText | ThreadChannelType,\n> {\n\t/**\n\t * The timestamp of when the last pin in the channel happened\n\t */\n\tdeclare protected [kLastPinTimestamp]: number | null;\n\n\t/**\n\t * The template used for removing data from the raw data stored for each Channel.\n\t */\n\tpublic static readonly DataTemplate: Partial<\n\t\tChannelDataType<ChannelType.DM | ChannelType.GuildAnnouncement | ChannelType.GuildText | ThreadChannelType>\n\t> = {\n\t\tset last_pin_timestamp(_: string) {},\n\t};\n\n\tpublic [kMixinConstruct]() {\n\t\tthis[kLastPinTimestamp] ??= null;\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.optimizeData}\n\t */\n\tprotected optimizeData(data: Partial<ChannelDataType<Type>>) {\n\t\tif (data.last_pin_timestamp) {\n\t\t\tthis[kLastPinTimestamp] = Date.parse(data.last_pin_timestamp);\n\t\t}\n\t}\n\n\t/**\n\t * The timestamp of when the last pin in the channel happened.\n\t */\n\tpublic get lastPinTimestamp() {\n\t\treturn this[kLastPinTimestamp];\n\t}\n\n\t/**\n\t * The Date of when the last pin in the channel happened\n\t */\n\tpublic get lastPinAt() {\n\t\tconst lastPinTimestamp = this.lastPinTimestamp;\n\t\treturn lastPinTimestamp ? new Date(lastPinTimestamp) : null;\n\t}\n\n\t/**\n\t * Adds data from optimized properties omitted from [kData].\n\t *\n\t * @param data - the result of {@link (Structure:class).toJSON}\n\t */\n\tprotected [kMixinToJSON](data: Partial<ChannelDataType<Type>>) {\n\t\tdata.last_pin_timestamp = this[kLastPinTimestamp] ? new Date(this[kLastPinTimestamp]).toISOString() : null;\n\t}\n}\n","import type { TextChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface TextChannelMixin<Type extends TextChannelType = TextChannelType> extends Channel<Type> {}\n\nexport class TextChannelMixin<Type extends TextChannelType = TextChannelType> {\n\t/**\n\t * The id of the last message sent in this channel.\n\t */\n\tpublic get lastMessageId() {\n\t\treturn this[kData].last_message_id;\n\t}\n\n\t/**\n\t * Indicates whether this channel can contain messages\n\t */\n\tpublic isTextBased(): this is TextChannelMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { GuildTextChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport { TextChannelMixin } from './TextChannelMixin.js';\n\nexport class ChannelSlowmodeMixin<Type extends GuildTextChannelType> extends TextChannelMixin<Type> {\n\t/**\n\t * The rate limit per user (slowmode) of this channel.\n\t */\n\tpublic get rateLimitPerUser() {\n\t\treturn this[kData].rate_limit_per_user;\n\t}\n}\n","import type { ChannelType, GuildTextChannelType, ThreadChannelType } from 'discord-api-types/v10';\nimport type { Channel } from '../Channel.js';\n\nexport interface ChannelWebhookMixin<\n\tType extends ChannelType.GuildForum | ChannelType.GuildMedia | Exclude<GuildTextChannelType, ThreadChannelType> =\n\t\t| ChannelType.GuildForum\n\t\t| ChannelType.GuildMedia\n\t\t| Exclude<GuildTextChannelType, ThreadChannelType>,\n> extends Channel<Type> {}\n\nexport class ChannelWebhookMixin<\n\tType extends ChannelType.GuildForum | ChannelType.GuildMedia | Exclude<GuildTextChannelType, ThreadChannelType> =\n\t\t| ChannelType.GuildForum\n\t\t| ChannelType.GuildMedia\n\t\t| Exclude<GuildTextChannelType, ThreadChannelType>,\n> {\n\t/**\n\t * Indicates whether this channel can have webhooks\n\t */\n\tpublic isWebhookCapable(): this is ChannelWebhookMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { ChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\nimport { ChannelWebhookMixin } from './ChannelWebhookMixin.js';\n\nexport interface ChannelTopicMixin<\n\tType extends ChannelType.GuildAnnouncement | ChannelType.GuildForum | ChannelType.GuildMedia | ChannelType.GuildText,\n> extends Channel<Type> {}\n\nexport class ChannelTopicMixin<\n\tType extends ChannelType.GuildAnnouncement | ChannelType.GuildForum | ChannelType.GuildMedia | ChannelType.GuildText,\n> extends ChannelWebhookMixin<Type> {\n\t/**\n\t * The topic of this channel.\n\t */\n\tpublic get topic() {\n\t\treturn this[kData].topic;\n\t}\n\n\t/**\n\t * The duration after which new threads get archived by default on this channel.\n\t */\n\tpublic get defaultAutoArchiveDuration() {\n\t\treturn this[kData].default_auto_archive_duration;\n\t}\n\n\t/**\n\t * The default value for rate limit per user (slowmode) on new threads in this channel.\n\t */\n\tpublic get defaultThreadRateLimitPerUser() {\n\t\treturn this[kData].default_thread_rate_limit_per_user;\n\t}\n}\n","import { channelLink } from '@discordjs/formatters';\nimport type { ChannelType } from 'discord-api-types/v10';\nimport type { User } from '../../users/User.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface DMChannelMixin<\n\tType extends ChannelType.DM | ChannelType.GroupDM = ChannelType.DM | ChannelType.GroupDM,\n> extends Channel<Type> {}\n\n/**\n * @remarks has recipients, an array of sub-structures {@link User} that extending mixins should add to their DataTemplate and _optimizeData\n */\nexport class DMChannelMixin<Type extends ChannelType.DM | ChannelType.GroupDM = ChannelType.DM | ChannelType.GroupDM> {\n\t/**\n\t * The URL to this channel.\n\t */\n\tpublic get url() {\n\t\treturn channelLink(this.id);\n\t}\n\n\t/**\n\t * Indicates whether this channel is a DM or DM Group\n\t */\n\tpublic isDMBased(): this is DMChannelMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { ChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface GroupDMMixin extends Channel<ChannelType.GroupDM> {}\n\nexport class GroupDMMixin {\n\t/**\n\t * The icon hash of the group DM.\n\t */\n\tpublic get icon() {\n\t\treturn this[kData].icon;\n\t}\n\n\t/**\n\t * Whether the channel is managed by an application via the `gdm.join` OAuth2 scope.\n\t */\n\tpublic get managed() {\n\t\treturn this[kData].managed;\n\t}\n\n\t/**\n\t * The application id of the group DM creator if it is bot-created.\n\t */\n\tpublic get applicationId() {\n\t\treturn this[kData].application_id;\n\t}\n}\n","import type { ThreadChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface ThreadChannelMixin<Type extends ThreadChannelType = ThreadChannelType> extends Channel<Type> {}\n\n/**\n * @remarks has a sub-structure {@link ThreadMetadata} that extending mixins should add to their DataTemplate and _optimizeData\n */\nexport class ThreadChannelMixin<Type extends ThreadChannelType = ThreadChannelType> {\n\t/**\n\t * The approximate count of users in a thread, stops counting at 50\n\t */\n\tpublic get memberCount() {\n\t\treturn this[kData].member_count;\n\t}\n\n\t/**\n\t * The number of messages (not including the initial message or deleted messages) in a thread.\n\t */\n\tpublic get messageCount() {\n\t\treturn this[kData].message_count;\n\t}\n\n\t/**\n\t * The number of messages ever sent in a thread, it's similar to message_count on message creation,\n\t * but will not decrement the number when a message is deleted.\n\t */\n\tpublic get totalMessageSent() {\n\t\treturn this[kData].total_message_sent;\n\t}\n\n\t/**\n\t * Indicates whether this channel is a thread channel\n\t */\n\tpublic isThread(): this is ThreadChannelMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { ChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\n\nexport interface ThreadOnlyChannelMixin<\n\tType extends ChannelType.GuildForum | ChannelType.GuildMedia = ChannelType.GuildForum | ChannelType.GuildMedia,\n> extends Channel<Type> {}\n\n/**\n * @remarks has an array of sub-structures {@link ForumTag} that extending mixins should add to their DataTemplate and _optimizeData\n */\nexport class ThreadOnlyChannelMixin<\n\tType extends ChannelType.GuildForum | ChannelType.GuildMedia = ChannelType.GuildForum | ChannelType.GuildMedia,\n> {\n\t/**\n\t * The emoji to show in the add reaction button on a thread in this channel.\n\t */\n\tpublic get defaultReactionEmoji() {\n\t\treturn this[kData].default_reaction_emoji;\n\t}\n\n\t/**\n\t * The default sort order type used to order posts in this channel.\n\t *\n\t * @defaultValue `null` – indicates a preferred sort order hasn't been set.\n\t */\n\tpublic get defaultSortOrder() {\n\t\treturn this[kData].default_sort_order!;\n\t}\n\n\t/**\n\t * Indicates whether this channel only allows thread creation\n\t */\n\tpublic isThreadOnly(): this is ThreadOnlyChannelMixin & this {\n\t\treturn true;\n\t}\n}\n","import type { ChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Channel } from '../Channel.js';\nimport { TextChannelMixin } from './TextChannelMixin.js';\n\nexport interface VoiceChannelMixin<\n\tType extends ChannelType.GuildStageVoice | ChannelType.GuildVoice =\n\t\t| ChannelType.GuildStageVoice\n\t\t| ChannelType.GuildVoice,\n> extends Channel<Type> {}\n\nexport class VoiceChannelMixin<\n\tType extends ChannelType.GuildStageVoice | ChannelType.GuildVoice =\n\t\t| ChannelType.GuildStageVoice\n\t\t| ChannelType.GuildVoice,\n> extends TextChannelMixin<Type> {\n\t/**\n\t * The bitrate (in bits) of the voice channel.\n\t */\n\tpublic get bitrate() {\n\t\treturn this[kData].bitrate!;\n\t}\n\n\t/**\n\t * The voice region id for this channel, automatic when set to null.\n\t */\n\tpublic get rtcRegion() {\n\t\treturn this[kData].rtc_region!;\n\t}\n\n\t/**\n\t * The camera video quality mode of the voice channel, {@link discord-api-types/v10#(VideoQualityMode:enum) | Auto} when not present.\n\t */\n\tpublic get videoQualityMode() {\n\t\treturn this[kData].video_quality_mode!;\n\t}\n\n\t/**\n\t * The user limit of the voice channel.\n\t */\n\tpublic get userLimit() {\n\t\treturn this[kData].user_limit!;\n\t}\n\n\t/**\n\t * Indicates whether this channel has voice connection capabilities\n\t */\n\tpublic override isVoiceBased(): this is VoiceChannelMixin & this {\n\t\treturn true;\n\t}\n}\n","import { kClone, kData, kMixinConstruct, kMixinToJSON, kPatch } from './utils/symbols.js';\nimport type { ReplaceOmittedWithUnknown } from './utils/types.js';\n\nexport const DataTemplatePropertyName = 'DataTemplate';\nexport const OptimizeDataPropertyName = 'optimizeData';\n\n/**\n * Represents a data model from the Discord API\n *\n * @privateRemarks\n * Explanation of the type complexity surround Structure:\n *\n * There are two layers of Omitted generics, one here, which allows omitting things at the library level so we do not accidentally\n * access them, in addition to whatever the user does at the layer above.\n *\n * The second layer, in the exported structure is effectively a type cast that allows the getters types to match whatever data template is used\n *\n * In order to safely set and access this data, the constructor and patch take data as \"partial\" and forcibly assigns it to kData. To accommodate this,\n * kData stores properties as `unknown` when it is omitted, which allows accessing the property in getters even when it may not actually be present.\n * This is the most technically correct way of representing the value, especially since there is no way to guarantee runtime matches the \"type cast.\"\n */\nexport abstract class Structure<DataType extends {}, Omitted extends keyof DataType | '' = ''> {\n\t/**\n\t * A construct function used when mixing to allow mixins to set optimized property defaults\n\t *\n\t * @internal\n\t * @remarks This should only be used to set defaults, setting optimized values should be done\n\t * in the mixins `optimizeData` method, which will be called automatically.\n\t * @param data - The full API data received by the Structure\n\t */\n\tprotected [kMixinConstruct]?(data: Partial<DataType>): void;\n\n\t/**\n\t * A function used when mixing to allow mixins to add properties to the result of toJSON\n\t *\n\t * @internal\n\t * @remarks This should only be used to add properties that the mixin optimizes, if the raw\n\t * JSON data is unchanged the property will already be returned.\n\t * @param data - The result of the base class toJSON Structure before it gets returned\n\t */\n\tprotected [kMixinToJSON]?(data: Partial<DataType>): void;\n\n\t/**\n\t * The template used for removing data from the raw data stored for each Structure.\n\t *\n\t * @remarks This template should be overridden in all subclasses to provide more accurate type information.\n\t * The template in the base {@link Structure} class will have no effect on most subclasses for this reason.\n\t */\n\tprotected static readonly DataTemplate: Record<string, unknown> = {};\n\n\t/**\n\t * @returns A cloned version of the data template, ready to create a new data object.\n\t */\n\tprivate getDataTemplate() {\n\t\treturn Object.create((this.constructor as typeof Structure).DataTemplate);\n\t}\n\n\t/**\n\t * The raw data from the API for this structure\n\t *\n\t * @internal\n\t */\n\tprotected [kData]: Readonly<ReplaceOmittedWithUnknown<Omitted, DataType>>;\n\n\t/**\n\t * Creates a new structure to represent API data\n\t *\n\t * @param data - the data from the API that this structure will represent\n\t * @remarks To be made public in subclasses\n\t * @internal\n\t */\n\tpublic constructor(data: Readonly<Partial<DataType>>, ..._rest: unknown[]) {\n\t\tthis[kData] = Object.assign(this.getDataTemplate(), data);\n\t\tthis[kMixinConstruct]?.(data);\n\t}\n\n\t/**\n\t * Patches the raw data of this object in place\n\t *\n\t * @param data - the updated data from the API to patch with\n\t * @remarks To be made public in subclasses\n\t * @returns this\n\t * @internal\n\t */\n\tprotected [kPatch](data: Readonly<Partial<DataType>>): this {\n\t\tthis[kData] = Object.assign(this.getDataTemplate(), this[kData], data);\n\t\tthis.optimizeData(data);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Creates a clone of this structure\n\t *\n\t * @returns a clone of this\n\t * @internal\n\t */\n\tprotected [kClone](patchPayload?: Readonly<Partial<DataType>>): typeof this {\n\t\tconst clone = this.toJSON();\n\t\t// @ts-expect-error constructor is of abstract class is unknown\n\t\treturn new this.constructor(\n\t\t\t// Ensure the ts-expect-error only applies to the constructor call\n\t\t\tpatchPayload ? Object.assign(clone, patchPayload) : clone,\n\t\t);\n\t}\n\n\t/**\n\t * Function called to ensure stored raw data is in optimized formats, used in tandem with a data template\n\t *\n\t * @example created_timestamp is an ISO string, this can be stored in optimized form as a number\n\t * @param _data - the raw data received from the API to optimize\n\t * @remarks Implementation to be done in subclasses and mixins where needed.\n\t * For typescript users, mixins must use the closest ancestors access modifier.\n\t * @remarks Automatically called in Structure[kPatch] but must be called manually in the constructor\n\t * of any class implementing this method.\n\t * @remarks Additionally, when implementing, ensure to call `super._optimizeData` if any class in the super chain aside\n\t * from Structure contains an implementation.\n\t * Note: mixins do not need to call super ever as the process of mixing walks the prototype chain.\n\t * @virtual\n\t * @internal\n\t */\n\tprotected optimizeData(_data: Partial<DataType>) {}\n\n\t/**\n\t * Transforms this object to its JSON format with raw API data (or close to it),\n\t * automatically called by `JSON.stringify()` when this structure is stringified\n\t *\n\t * @remarks\n\t * The type of this data is determined by omissions at runtime and is only guaranteed for default omissions\n\t * @privateRemarks\n\t * When omitting properties at the library level, this must be overridden to re-add those properties\n\t */\n\tpublic toJSON(): DataType {\n\t\t// This will be DataType provided nothing is omitted, when omits occur, subclass needs to overwrite this.\n\t\tconst data =\n\t\t\t// Spread is way faster than structuredClone, but is shallow. So use it only if there is no nested objects\n\t\t\t(\n\t\t\t\tObject.values(this[kData]).some((value) => typeof value === 'object' && value !== null)\n\t\t\t\t\t? structuredClone(this[kData])\n\t\t\t\t\t: { ...this[kData] }\n\t\t\t) as DataType;\n\t\tthis[kMixinToJSON]?.(data);\n\t\treturn data;\n\t}\n}\n","import type { APIGuildForumTag } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents metadata of a thread channel on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class ForumTag<Omitted extends keyof APIGuildForumTag | '' = ''> extends Structure<APIGuildForumTag, Omitted> {\n\tpublic constructor(data: Partialize<APIGuildForumTag, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the tag.\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The name of the tag.\n\t */\n\tpublic get name() {\n\t\treturn this[kData].name;\n\t}\n\n\t/**\n\t * Whether this tag can only be added to or removed from threads by a member with the {@link discord-api-types/v10#(PermissionFlagsBits:variable) | ManageThreads} permission.\n\t */\n\tpublic get moderated() {\n\t\treturn this[kData].moderated;\n\t}\n\n\t/**\n\t * The id of a guild's custom emoji.\n\t */\n\tpublic get emojiId() {\n\t\treturn this[kData].emoji_id;\n\t}\n\n\t/**\n\t * The unicode character of the emoji.\n\t */\n\tpublic get emojiName() {\n\t\treturn this[kData].emoji_name;\n\t}\n\n\t/**\n\t * The textual representation of this tag's emoji. Either a unicode character or a guild emoji mention.\n\t */\n\tpublic get emoji() {\n\t\treturn this.emojiName ?? `<:_:${this.emojiId}>`;\n\t}\n}\n","import type { APIOverwrite } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { PermissionsBitField } from '../bitfields/PermissionsBitField.js';\nimport { kAllow, kData, kDeny } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents metadata of a thread channel on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class PermissionOverwrite<Omitted extends keyof APIOverwrite | '' = 'allow' | 'deny'> extends Structure<\n\tAPIOverwrite,\n\tOmitted\n> {\n\tprotected [kAllow]: bigint | null = null;\n\n\tprotected [kDeny]: bigint | null = null;\n\n\tpublic constructor(data: Partialize<APIOverwrite, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n\n\t/**\n\t * The template used for removing data from the raw data stored for each ThreadMetadata\n\t *\n\t * @remarks This template has defaults, if you want to remove additional data and keep the defaults,\n\t * use `Object.defineProperties`. To override the defaults, set this value directly.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIOverwrite> = {\n\t\tset allow(_: string) {},\n\t\tset deny(_: string) {},\n\t};\n\n\t/**\n\t * {@inheritDoc Structure.optimizeData}\n\t */\n\tprotected override optimizeData(data: Partial<APIOverwrite>) {\n\t\tif (data.allow) {\n\t\t\tthis[kAllow] = BigInt(data.allow);\n\t\t}\n\n\t\tif (data.deny) {\n\t\t\tthis[kDeny] = BigInt(data.deny);\n\t\t}\n\t}\n\n\t/**\n\t * The permission bit set allowed by this overwrite.\n\t */\n\tpublic get allow() {\n\t\tconst allow = this[kAllow];\n\t\treturn typeof allow === 'bigint' ? new PermissionsBitField(allow) : null;\n\t}\n\n\t/**\n\t * The permission bit set denied by this overwrite.\n\t */\n\tpublic get deny() {\n\t\tconst deny = this[kDeny];\n\t\treturn typeof deny === 'bigint' ? new PermissionsBitField(deny) : null;\n\t}\n\n\t/**\n\t * The role or user id for this overwrite.\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The type of this overwrite.\n\t */\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.toJSON}\n\t */\n\tpublic override toJSON() {\n\t\tconst clone = super.toJSON();\n\t\tif (this[kAllow]) {\n\t\t\tclone.allow = this[kAllow].toString();\n\t\t}\n\n\t\tif (this[kDeny]) {\n\t\t\tclone.deny = this[kDeny].toString();\n\t\t}\n\n\t\treturn clone;\n\t}\n}\n","import type { APIThreadMetadata } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kArchiveTimestamp, kCreatedTimestamp, kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents metadata of a thread channel on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class ThreadMetadata<\n\tOmitted extends keyof APIThreadMetadata | '' = 'archive_timestamp' | 'create_timestamp',\n> extends Structure<APIThreadMetadata, Omitted> {\n\tprotected [kArchiveTimestamp]: number | null = null;\n\n\tprotected [kCreatedTimestamp]: number | null = null;\n\n\tpublic constructor(data: Partialize<APIThreadMetadata, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n\n\t/**\n\t * The template used for removing data from the raw data stored for each ThreadMetadata\n\t *\n\t * @remarks This template has defaults, if you want to remove additional data and keep the defaults,\n\t * use `Object.defineProperties`. To override the defaults, set this value directly.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIThreadMetadata> = {\n\t\tset create_timestamp(_: string) {},\n\t\tset archive_timestamp(_: string) {},\n\t};\n\n\t/**\n\t * {@inheritDoc Structure.optimizeData}\n\t */\n\tprotected override optimizeData(data: Partial<APIThreadMetadata>) {\n\t\tif (data.create_timestamp) {\n\t\t\tthis[kCreatedTimestamp] = Date.parse(data.create_timestamp);\n\t\t}\n\n\t\tif (data.archive_timestamp) {\n\t\t\tthis[kArchiveTimestamp] = Date.parse(data.archive_timestamp);\n\t\t}\n\t}\n\n\t/**\n\t * Whether the thread is archived.\n\t */\n\tpublic get archived() {\n\t\treturn this[kData].archived;\n\t}\n\n\t/**\n\t * The timestamp when the thread's archive status was last changed, used for calculating recent activity.\n\t */\n\tpublic get archivedTimestamp() {\n\t\treturn this[kArchiveTimestamp];\n\t}\n\n\t/**\n\t * The timestamp when the thread was created; only populated for threads created after 2022-01-09.\n\t */\n\tpublic get createdTimestamp() {\n\t\treturn this[kCreatedTimestamp];\n\t}\n\n\t/**\n\t * The thread will stop showing in the channel list after auto_archive_duration minutes of inactivity,\n\t */\n\tpublic get autoArchiveDuration() {\n\t\treturn this[kData].auto_archive_duration;\n\t}\n\n\t/**\n\t * Whether non-moderators can add other non-moderators to a thread; only available on private threads.\n\t */\n\tpublic get invitable() {\n\t\treturn this[kData].invitable;\n\t}\n\n\t/**\n\t * Whether the thread is locked; when a thread is locked, only users with {@link discord-api-types/v10#(PermissionFlagsBits:variable) | ManageThreads} can unarchive it.\n\t */\n\tpublic get locked() {\n\t\treturn this[kData].locked;\n\t}\n\n\t/**\n\t * The time the thread was archived at\n\t */\n\tpublic get archivedAt() {\n\t\tconst archivedTimestamp = this.archivedTimestamp;\n\t\treturn archivedTimestamp ? new Date(archivedTimestamp) : null;\n\t}\n\n\t/**\n\t * The time the thread was created at\n\t */\n\tpublic get createdAt() {\n\t\tconst createdTimestamp = this.createdTimestamp;\n\t\treturn createdTimestamp ? new Date(createdTimestamp) : null;\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.toJSON}\n\t */\n\tpublic override toJSON() {\n\t\tconst data = super.toJSON();\n\t\tif (this[kArchiveTimestamp]) {\n\t\t\tdata.archive_timestamp = new Date(this[kArchiveTimestamp]).toISOString();\n\t\t}\n\n\t\tif (this[kCreatedTimestamp]) {\n\t\t\tdata.create_timestamp = new Date(this[kCreatedTimestamp]).toISOString();\n\t\t}\n\n\t\treturn data;\n\t}\n}\n","import { DiscordSnowflake } from '@sapphire/snowflake';\nimport type { APIChannel, APIPartialChannel, ChannelType, ChannelFlags } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { ChannelFlagsBitField } from '../bitfields/ChannelFlagsBitField.js';\nimport { kData } from '../utils/symbols.js';\nimport { isIdSet } from '../utils/type-guards.js';\nimport type { Partialize } from '../utils/types.js';\nimport type { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport type { ChannelWebhookMixin } from './mixins/ChannelWebhookMixin.js';\nimport type { DMChannelMixin } from './mixins/DMChannelMixin.js';\nimport type { GuildChannelMixin } from './mixins/GuildChannelMixin.js';\nimport type { TextChannelMixin } from './mixins/TextChannelMixin.js';\nimport type { ThreadChannelMixin } from './mixins/ThreadChannelMixin.js';\nimport type { ThreadOnlyChannelMixin } from './mixins/ThreadOnlyChannelMixin.js';\nimport type { VoiceChannelMixin } from './mixins/VoiceChannelMixin.js';\n\nexport type PartialChannel = Channel<ChannelType, Exclude<keyof APIChannel, keyof APIPartialChannel>>;\n\n/**\n * The data stored by a {@link Channel} structure based on its {@link (Channel:class).\"type\"} property.\n */\nexport type ChannelDataType<Type extends ChannelType | 'unknown'> = Type extends ChannelType\n\t? Extract<APIChannel, { type: Type }>\n\t: APIPartialChannel;\n\n/**\n * Represents any channel on Discord.\n *\n * @typeParam Type - Specify the type of the channel being constructed for more accurate data types\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks Although this class _can_ be instantiated directly for any channel type,\n * it's intended to be subclassed with the appropriate mixins for each channel type.\n */\nexport class Channel<\n\tType extends ChannelType | 'unknown' = ChannelType,\n\tOmitted extends keyof ChannelDataType<Type> | '' = '',\n> extends Structure<ChannelDataType<Type>, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each Channel.\n\t *\n\t * @remarks This template is only guaranteed to apply to channels constructed directly via `new Channel()`.\n\t * Use the appropriate subclass template to remove data from that channel type.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIChannel> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the channel\n\t */\n\tpublic constructor(data: Partialize<ChannelDataType<Type>, Omitted>) {\n\t\tsuper(data as ChannelDataType<Type>);\n\t}\n\n\t/**\n\t * The id of the channel\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The type of the channel\n\t */\n\tpublic get type() {\n\t\t// This cast can be incorrect when type is omitted and if the wrong type of channel was constructed\n\t\treturn this[kData].type as Type extends 'unknown' ? number : Type;\n\t}\n\n\t/**\n\t * The name of the channel, null for DMs\n\t *\n\t * @privateRemarks The type of `name` can be narrowed in Guild Channels and DM channels to string and null respectively,\n\t * respecting Omit behaviors\n\t */\n\tpublic get name() {\n\t\treturn this[kData].name;\n\t}\n\n\t/**\n\t * The flags that are applied to the channel.\n\t *\n\t * @privateRemarks The type of `flags` can be narrowed in Guild Channels and DMChannel to ChannelFlags, and in GroupDM channel\n\t * to null, respecting Omit behaviors\n\t */\n\tpublic get flags() {\n\t\tconst flags =\n\t\t\t'flags' in this[kData] && typeof this[kData].flags === 'number' ? (this[kData].flags as ChannelFlags) : null;\n\t\treturn flags ? new ChannelFlagsBitField(flags) : null;\n\t}\n\n\t/**\n\t * The timestamp the channel was created at\n\t */\n\tpublic get createdTimestamp() {\n\t\treturn isIdSet(this.id) ? DiscordSnowflake.timestampFrom(this.id) : null;\n\t}\n\n\t/**\n\t * The time the channel was created at\n\t */\n\tpublic get createdAt() {\n\t\tconst createdTimestamp = this.createdTimestamp;\n\t\treturn createdTimestamp ? new Date(createdTimestamp) : null;\n\t}\n\n\t/**\n\t * Indicates whether this channel is a thread channel\n\t *\n\t * @privateRemarks Overridden to `true` on `ThreadChannelMixin`\n\t */\n\tpublic isThread(): this is ThreadChannelMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel can contain messages\n\t *\n\t * @privateRemarks Overridden to `true` on `TextChannelMixin`\n\t */\n\tpublic isTextBased(): this is TextChannelMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel is in a guild\n\t *\n\t * @privateRemarks Overridden to `true` on `GuildChannelMixin`\n\t */\n\tpublic isGuildBased(): this is GuildChannelMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel is a DM or DM Group\n\t *\n\t * @privateRemarks Overridden to `true` on `DMChannelMixin`\n\t */\n\tpublic isDMBased(): this is DMChannelMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel has voice connection capabilities\n\t *\n\t * @privateRemarks Overridden to `true` on `VoiceChannelMixin`\n\t */\n\tpublic isVoiceBased(): this is VoiceChannelMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel only allows thread creation\n\t *\n\t * @privateRemarks Overridden to `true` on `ThreadOnlyChannelMixin`\n\t */\n\tpublic isThreadOnly(): this is ThreadOnlyChannelMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel can have permission overwrites\n\t *\n\t * @privateRemarks Overridden to `true` on `ChannelPermissionsMixin`\n\t */\n\tpublic isPermissionCapable(): this is ChannelPermissionMixin & this {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Indicates whether this channel can have webhooks\n\t *\n\t * @privateRemarks Overridden to `true` on `ChannelWebhooksMixin`\n\t */\n\tpublic isWebhookCapable(): this is ChannelWebhookMixin & this {\n\t\treturn false;\n\t}\n}\n","export function isIdSet(id: unknown): id is bigint | string {\n\treturn typeof id === 'string' || typeof id === 'bigint';\n}\n","import { DataTemplatePropertyName, OptimizeDataPropertyName, type Structure } from './Structure.js';\nimport { kMixinConstruct, kMixinToJSON } from './utils/symbols.js';\n\nexport type Mixinable<ClassType> = new (...args: unknown[]) => ClassType;\n\nexport type MixinBase<BaseClass extends Structure<{}>> =\n\tBaseClass extends Structure<infer DataType, infer Omitted> ? Structure<DataType, Omitted> : never;\n\n/**\n * Copies the prototype (getters, setters, and methods) of all mixins to the destination class.\n * For type information see {@link MixinTypes}\n *\n * @param destination - The class to apply the mixins to, must extend the base that the mixins expect it to.\n * @param mixins - Classes that contain \"pure\" prototypes to be copied on top of the destination class prototype\n * @remarks All mixins should be \"pure\" in that they only contain getters, setters, and methods.\n * The runtime code will only copy these, and adding properties to the class only results\n * in the types of the mixed class being wrong.\n * @example\n * ```\n * // Interface merging on the mixin to give type access to props on the base and kData that are available once copied\n * interface TextMixin extends Channel {}\n * class TextMixin {\n * \t// Methods / getters\n * }\n *\n * // Interface merging on the mixed class to give it accurate type information within the declaration and when instantiated\n * interface TextChannel extends MixinTypes<Channel, [TextMixin]> {}\n * class TextChannel extends Channel {}\n *\n * // Apply for runtime\n * Mixin(TextChannel, [TextMixin])\n * ```\n * @typeParam DestinationClass - The class to be mixed, ensures that the mixins provided can be used with this destination\n */\nexport function Mixin<DestinationClass extends typeof Structure<{}>>(\n\tdestination: DestinationClass,\n\tmixins: Mixinable<MixinBase<DestinationClass['prototype']>>[],\n) {\n\tconst dataTemplates: Record<string, unknown>[] = [];\n\tconst dataOptimizations: ((data: unknown) => void)[] = [];\n\tconst enrichToJSONs: ((data: Partial<unknown>) => void)[] = [];\n\tconst constructors: ((data: Partial<unknown>) => void)[] = [];\n\n\tfor (const mixin of mixins) {\n\t\t// The entire prototype chain, in reverse order, since we want to copy it all\n\t\tconst prototypeChain: MixinBase<DestinationClass['prototype']>[] = [];\n\t\tlet extendedClass = mixin;\n\t\twhile (extendedClass.prototype !== undefined) {\n\t\t\tif (\n\t\t\t\tDataTemplatePropertyName in extendedClass &&\n\t\t\t\ttypeof extendedClass.DataTemplate === 'object' &&\n\t\t\t\t// eslint-disable-next-line no-eq-null, eqeqeq\n\t\t\t\textendedClass.DataTemplate != null\n\t\t\t) {\n\t\t\t\tdataTemplates.push(extendedClass.DataTemplate as Record<string, unknown>);\n\t\t\t}\n\n\t\t\tprototypeChain.unshift(extendedClass.prototype);\n\t\t\textendedClass = Object.getPrototypeOf(extendedClass);\n\t\t}\n\n\t\tfor (const prototype of prototypeChain) {\n\t\t\t// Symboled data isn't traversed by Object.entries, we can handle it here\n\t\t\tif (prototype[kMixinConstruct]) {\n\t\t\t\tconstructors.push(prototype[kMixinConstruct]);\n\t\t\t}\n\n\t\t\tif (prototype[kMixinToJSON]) {\n\t\t\t\tenrichToJSONs.push(prototype[kMixinToJSON]);\n\t\t\t}\n\n\t\t\t// Copy instance methods and setters / getters\n\t\t\tconst originalDescriptors = Object.getOwnPropertyDescriptors(prototype);\n\t\t\tconst usingDescriptors: { [prop: string]: PropertyDescriptor } = {};\n\t\t\tfor (const [prop, descriptor] of Object.entries(originalDescriptors)) {\n\t\t\t\t// Drop constructor\n\t\t\t\tif (['constructor'].includes(prop)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Special case for optimize function, we want to combine these\n\t\t\t\tif (prop === OptimizeDataPropertyName) {\n\t\t\t\t\tif (typeof descriptor.value !== 'function')\n\t\t\t\t\t\tthrow new RangeError(`Expected ${prop} to be a function, received ${typeof descriptor.value} instead.`);\n\t\t\t\t\tdataOptimizations.push(descriptor.value);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Shouldn't be anything other than these without being instantiated, but just in case\n\t\t\t\tif (\n\t\t\t\t\ttypeof descriptor.get !== 'undefined' ||\n\t\t\t\t\ttypeof descriptor.set !== 'undefined' ||\n\t\t\t\t\ttypeof descriptor.value === 'function'\n\t\t\t\t) {\n\t\t\t\t\tusingDescriptors[prop] = descriptor;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tObject.defineProperties(destination.prototype, usingDescriptors);\n\t\t}\n\t}\n\n\t// Set the function to call any mixed constructors\n\tif (constructors.length > 0) {\n\t\tObject.defineProperty(destination.prototype, kMixinConstruct, {\n\t\t\twritable: true,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true,\n\t\t\t// eslint-disable-next-line func-name-matching\n\t\t\tvalue: function _mixinConstructors(data: Partial<unknown>) {\n\t\t\t\tfor (const construct of constructors) {\n\t\t\t\t\tconstruct.call(this, data);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t}\n\n\t// Combine all optimizations into a single function\n\tconst baseOptimize = Object.getOwnPropertyDescriptor(destination, OptimizeDataPropertyName);\n\tif (baseOptimize && typeof baseOptimize.value === 'function') {\n\t\t// call base last (mimic constructor behavior)\n\t\tdataOptimizations.push(baseOptimize.value);\n\t}\n\n\tconst superOptimize = Object.getOwnPropertyDescriptor(\n\t\tObject.getPrototypeOf(destination).prototype,\n\t\tOptimizeDataPropertyName,\n\t);\n\t// the mixin base optimize should call super, so we can ignore the super in that case\n\tif (!baseOptimize && superOptimize && typeof superOptimize.value === 'function') {\n\t\t// call super first (mimic constructor behavior)\n\t\tdataOptimizations.unshift(superOptimize.value);\n\t}\n\n\t// If there's more than one optimization or if there's an optimization that isn't on the destination (base)\n\tif (dataOptimizations.length > 1 || (dataOptimizations.length === 1 && !baseOptimize)) {\n\t\tObject.defineProperty(destination.prototype, OptimizeDataPropertyName, {\n\t\t\twritable: true,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true,\n\t\t\t// eslint-disable-next-line func-name-matching\n\t\t\tvalue: function _mixinOptimizeData(data: unknown) {\n\t\t\t\tfor (const optimization of dataOptimizations) {\n\t\t\t\t\toptimization.call(this, data);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t}\n\n\tif (enrichToJSONs.length > 0) {\n\t\tObject.defineProperty(destination.prototype, kMixinToJSON, {\n\t\t\twritable: true,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true,\n\t\t\t// eslint-disable-next-line func-name-matching\n\t\t\tvalue: function _mixinToJSON(data: Partial<unknown>) {\n\t\t\t\tfor (const enricher of enrichToJSONs) {\n\t\t\t\t\tenricher.call(this, data);\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t}\n\n\t// Copy the properties (setters) of each mixins template to the destinations template\n\tif (dataTemplates.length > 0) {\n\t\tif (!Object.getOwnPropertyDescriptor(destination, DataTemplatePropertyName)) {\n\t\t\tObject.defineProperty(destination, DataTemplatePropertyName, {\n\t\t\t\tvalue: Object.defineProperties({}, Object.getOwnPropertyDescriptors(destination[DataTemplatePropertyName])),\n\t\t\t\twritable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t});\n\t\t}\n\n\t\tfor (const template of dataTemplates) {\n\t\t\tObject.defineProperties(destination[DataTemplatePropertyName], Object.getOwnPropertyDescriptors(template));\n\t\t}\n\t}\n}\n","import type { APINewsChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { ChannelPinMixin } from './mixins/ChannelPinMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { ChannelTopicMixin } from './mixins/ChannelTopicMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\n\nexport interface AnnouncementChannel<Omitted extends keyof APINewsChannel | '' = ''> extends MixinTypes<\n\tChannel<ChannelType.GuildAnnouncement>,\n\t[\n\t\tTextChannelMixin<ChannelType.GuildAnnouncement>,\n\t\tChannelParentMixin<ChannelType.GuildAnnouncement>,\n\t\tChannelPermissionMixin<ChannelType.GuildAnnouncement>,\n\t\tChannelPinMixin<ChannelType.GuildAnnouncement>,\n\t\tChannelSlowmodeMixin<ChannelType.GuildAnnouncement>,\n\t\tChannelTopicMixin<ChannelType.GuildAnnouncement>,\n\t]\n> {}\n\n/**\n * Sample Implementation of a structure for announcement channels, usable by direct end consumers.\n */\nexport class AnnouncementChannel<Omitted extends keyof APINewsChannel | '' = ''> extends Channel<\n\tChannelType.GuildAnnouncement,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APINewsChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(AnnouncementChannel, [\n\tTextChannelMixin,\n\tChannelParentMixin,\n\tChannelPermissionMixin,\n\tChannelPinMixin,\n\tChannelSlowmodeMixin,\n\tChannelTopicMixin,\n]);\n","import type { APIAnnouncementThreadChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelOwnerMixin } from './mixins/ChannelOwnerMixin.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPinMixin } from './mixins/ChannelPinMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { GuildChannelMixin } from './mixins/GuildChannelMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\nimport { ThreadChannelMixin } from './mixins/ThreadChannelMixin.js';\n\nexport interface AnnouncementThreadChannel<\n\tOmitted extends keyof APIAnnouncementThreadChannel | '' = '',\n> extends MixinTypes<\n\tChannel<ChannelType.AnnouncementThread>,\n\t[\n\t\tTextChannelMixin<ChannelType.AnnouncementThread>,\n\t\tChannelOwnerMixin<ChannelType.AnnouncementThread>,\n\t\tChannelParentMixin<ChannelType.AnnouncementThread>,\n\t\tChannelPinMixin<ChannelType.AnnouncementThread>,\n\t\tChannelSlowmodeMixin<ChannelType.AnnouncementThread>,\n\t\tGuildChannelMixin<ChannelType.AnnouncementThread>,\n\t\tThreadChannelMixin<ChannelType.AnnouncementThread>,\n\t]\n> {}\n\n/**\n * Sample Implementation of a structure for announcement threads, usable by direct end consumers.\n */\nexport class AnnouncementThreadChannel<Omitted extends keyof APIAnnouncementThreadChannel | '' = ''> extends Channel<\n\tChannelType.AnnouncementThread,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIAnnouncementThreadChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData?.(data);\n\t}\n}\n\nMixin(AnnouncementThreadChannel, [\n\tTextChannelMixin,\n\tChannelOwnerMixin,\n\tChannelParentMixin,\n\tChannelPinMixin,\n\tChannelSlowmodeMixin,\n\tGuildChannelMixin,\n\tThreadChannelMixin,\n]);\n","import type { APIGuildCategoryChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { GuildChannelMixin } from './mixins/GuildChannelMixin.js';\n\nexport interface CategoryChannel<Omitted extends keyof APIGuildCategoryChannel | '' = ''> extends MixinTypes<\n\tChannel<ChannelType.GuildCategory>,\n\t[ChannelPermissionMixin<ChannelType.GuildCategory>, GuildChannelMixin<ChannelType.GuildCategory>]\n> {}\n\n/**\n * Sample Implementation of a structure for category channels, usable by direct end consumers.\n */\nexport class CategoryChannel<Omitted extends keyof APIGuildCategoryChannel | '' = ''> extends Channel<\n\tChannelType.GuildCategory,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIGuildCategoryChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(CategoryChannel, [ChannelPermissionMixin, GuildChannelMixin]);\n","import type { APIDMChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelPinMixin } from './mixins/ChannelPinMixin.js';\nimport { DMChannelMixin } from './mixins/DMChannelMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\n\nexport interface DMChannel<Omitted extends keyof APIDMChannel | '' = ''> extends MixinTypes<\n\tChannel<ChannelType.DM>,\n\t[DMChannelMixin<ChannelType.DM>, TextChannelMixin<ChannelType.DM>, ChannelPinMixin<ChannelType.DM>]\n> {}\n\n/**\n * Sample Implementation of a structure for dm channels, usable by direct end consumers.\n */\nexport class DMChannel<Omitted extends keyof APIDMChannel | '' = ''> extends Channel<ChannelType.DM, Omitted> {\n\tpublic constructor(data: Partialize<APIDMChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(DMChannel, [DMChannelMixin, TextChannelMixin, ChannelPinMixin]);\n","import type { APIGuildForumChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { ChannelTopicMixin } from './mixins/ChannelTopicMixin.js';\nimport { ThreadOnlyChannelMixin } from './mixins/ThreadOnlyChannelMixin.js';\n\nexport interface ForumChannel<Omitted extends keyof APIGuildForumChannel | '' = ''> extends MixinTypes<\n\tChannel<ChannelType.GuildForum>,\n\t[\n\t\tChannelParentMixin<ChannelType.GuildForum>,\n\t\tChannelPermissionMixin<ChannelType.GuildForum>,\n\t\tChannelTopicMixin<ChannelType.GuildForum>,\n\t\tThreadOnlyChannelMixin<ChannelType.GuildForum>,\n\t]\n> {}\n\n/**\n * Sample Implementation of a structure for forum channels, usable by direct end consumers.\n */\nexport class ForumChannel<Omitted extends keyof APIGuildForumChannel | '' = ''> extends Channel<\n\tChannelType.GuildForum,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIGuildForumChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n\n\t/**\n\t * The default forum layout view used to display posts in this channel.\n\t * Defaults to 0, which indicates a layout view has not been set by a channel admin.\n\t */\n\tpublic get defaultForumLayout() {\n\t\treturn this[kData].default_forum_layout;\n\t}\n}\n\nMixin(ForumChannel, [ChannelParentMixin, ChannelPermissionMixin, ChannelTopicMixin, ThreadOnlyChannelMixin]);\n","import type { APIGroupDMChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelOwnerMixin } from './mixins/ChannelOwnerMixin.js';\nimport { DMChannelMixin } from './mixins/DMChannelMixin.js';\nimport { GroupDMMixin } from './mixins/GroupDMMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\n\nexport interface GroupDMChannel<Omitted extends keyof APIGroupDMChannel | '' = ''> extends MixinTypes<\n\tChannel<ChannelType.GroupDM>,\n\t[\n\t\tDMChannelMixin<ChannelType.GroupDM>,\n\t\tTextChannelMixin<ChannelType.GroupDM>,\n\t\tChannelOwnerMixin<ChannelType.GroupDM>,\n\t\tGroupDMMixin,\n\t]\n> {}\n\n/**\n * Sample Implementation of a structure for group dm channels, usable by direct end consumers.\n */\nexport class GroupDMChannel<Omitted extends keyof APIGroupDMChannel | '' = ''> extends Channel<\n\tChannelType.GroupDM,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIGroupDMChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(GroupDMChannel, [DMChannelMixin, TextChannelMixin, ChannelOwnerMixin, GroupDMMixin]);\n","import type { APIGuildMediaChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { ChannelTopicMixin } from './mixins/ChannelTopicMixin.js';\nimport { ThreadOnlyChannelMixin } from './mixins/ThreadOnlyChannelMixin.js';\n\nexport interface MediaChannel<Omitted extends keyof APIGuildMediaChannel | '' = ''> extends MixinTypes<\n\tChannel<ChannelType.GuildMedia>,\n\t[\n\t\tChannelParentMixin<ChannelType.GuildMedia>,\n\t\tChannelPermissionMixin<ChannelType.GuildMedia>,\n\t\tChannelTopicMixin<ChannelType.GuildMedia>,\n\t\tThreadOnlyChannelMixin<ChannelType.GuildMedia>,\n\t]\n> {}\n\n/**\n * Sample Implementation of a structure for media channels, usable by direct end consumers.\n */\nexport class MediaChannel<Omitted extends keyof APIGuildMediaChannel | '' = ''> extends Channel<\n\tChannelType.GuildMedia,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIGuildMediaChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(MediaChannel, [ChannelParentMixin, ChannelPermissionMixin, ChannelTopicMixin, ThreadOnlyChannelMixin]);\n","import type { APIPrivateThreadChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelOwnerMixin } from './mixins/ChannelOwnerMixin.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPinMixin } from './mixins/ChannelPinMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\nimport { ThreadChannelMixin } from './mixins/ThreadChannelMixin.js';\n\nexport interface PrivateThreadChannel<Omitted extends keyof APIPrivateThreadChannel | '' = ''> extends MixinTypes<\n\tChannel<ChannelType.PrivateThread>,\n\t[\n\t\tTextChannelMixin<ChannelType.PrivateThread>,\n\t\tChannelOwnerMixin<ChannelType.PrivateThread>,\n\t\tChannelParentMixin<ChannelType.PrivateThread>,\n\t\tChannelPinMixin<ChannelType.PrivateThread>,\n\t\tChannelSlowmodeMixin<ChannelType.PrivateThread>,\n\t\tThreadChannelMixin<ChannelType.PrivateThread>,\n\t]\n> {}\n\n/**\n * Sample Implementation of a structure for private thread channels, usable by direct end consumers.\n */\nexport class PrivateThreadChannel<Omitted extends keyof APIPrivateThreadChannel | '' = ''> extends Channel<\n\tChannelType.PrivateThread,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIPrivateThreadChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(PrivateThreadChannel, [\n\tTextChannelMixin,\n\tChannelOwnerMixin,\n\tChannelParentMixin,\n\tChannelPinMixin,\n\tChannelSlowmodeMixin,\n\tThreadChannelMixin,\n]);\n","import type { APIPublicThreadChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { AppliedTagsMixin } from './mixins/AppliedTagsMixin.js';\nimport { ChannelOwnerMixin } from './mixins/ChannelOwnerMixin.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPinMixin } from './mixins/ChannelPinMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\nimport { ThreadChannelMixin } from './mixins/ThreadChannelMixin.js';\n\nexport interface PublicThreadChannel<Omitted extends keyof APIPublicThreadChannel | '' = ''> extends MixinTypes<\n\tChannel<ChannelType.PublicThread>,\n\t[\n\t\tTextChannelMixin<ChannelType.PublicThread>,\n\t\tChannelOwnerMixin<ChannelType.PublicThread>,\n\t\tChannelParentMixin<ChannelType.PublicThread>,\n\t\tChannelPinMixin<ChannelType.PublicThread>,\n\t\tChannelSlowmodeMixin<ChannelType.PublicThread>,\n\t\tThreadChannelMixin<ChannelType.PublicThread>,\n\t\tAppliedTagsMixin,\n\t]\n> {}\n\n/**\n * Sample Implementation of a structure for public thread channels, usable by direct end consumers.\n */\nexport class PublicThreadChannel<Omitted extends keyof APIPublicThreadChannel | '' = ''> extends Channel<\n\tChannelType.PublicThread,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIPublicThreadChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(PublicThreadChannel, [\n\tTextChannelMixin,\n\tChannelOwnerMixin,\n\tChannelParentMixin,\n\tChannelPinMixin,\n\tChannelSlowmodeMixin,\n\tThreadChannelMixin,\n\tAppliedTagsMixin,\n]);\n","import type { APIGuildStageVoiceChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { ChannelWebhookMixin } from './mixins/ChannelWebhookMixin.js';\nimport { VoiceChannelMixin } from './mixins/VoiceChannelMixin.js';\n\nexport interface StageChannel<Omitted extends keyof APIGuildStageVoiceChannel | '' = ''> extends MixinTypes<\n\tChannel<ChannelType.GuildStageVoice>,\n\t[\n\t\tChannelParentMixin<ChannelType.GuildStageVoice>,\n\t\tChannelPermissionMixin<ChannelType.GuildStageVoice>,\n\t\tChannelSlowmodeMixin<ChannelType.GuildStageVoice>,\n\t\tChannelWebhookMixin<ChannelType.GuildStageVoice>,\n\t\tVoiceChannelMixin<ChannelType.GuildStageVoice>,\n\t]\n> {}\n\nexport class StageChannel<Omitted extends keyof APIGuildStageVoiceChannel | '' = ''> extends Channel<\n\tChannelType.GuildStageVoice,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIGuildStageVoiceChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(StageChannel, [\n\tChannelParentMixin,\n\tChannelPermissionMixin,\n\tChannelSlowmodeMixin,\n\tChannelWebhookMixin,\n\tVoiceChannelMixin,\n]);\n","import type { APITextChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { ChannelPinMixin } from './mixins/ChannelPinMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { ChannelTopicMixin } from './mixins/ChannelTopicMixin.js';\nimport { TextChannelMixin } from './mixins/TextChannelMixin.js';\n\nexport interface TextChannel<Omitted extends keyof APITextChannel | '' = ''> extends MixinTypes<\n\tChannel<ChannelType.GuildText>,\n\t[\n\t\tTextChannelMixin<ChannelType.GuildText>,\n\t\tChannelParentMixin<ChannelType.GuildText>,\n\t\tChannelPermissionMixin<ChannelType.GuildText>,\n\t\tChannelPinMixin<ChannelType.GuildText>,\n\t\tChannelSlowmodeMixin<ChannelType.GuildText>,\n\t\tChannelTopicMixin<ChannelType.GuildText>,\n\t]\n> {}\n\nexport class TextChannel<Omitted extends keyof APITextChannel | '' = ''> extends Channel<\n\tChannelType.GuildText,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APITextChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(TextChannel, [\n\tTextChannelMixin,\n\tChannelParentMixin,\n\tChannelPermissionMixin,\n\tChannelPinMixin,\n\tChannelSlowmodeMixin,\n\tChannelTopicMixin,\n]);\n","import type { APIGuildVoiceChannel, ChannelType } from 'discord-api-types/v10';\nimport { Mixin } from '../Mixin.js';\nimport type { MixinTypes } from '../MixinTypes.d.ts';\nimport type { Partialize } from '../utils/types.js';\nimport { Channel } from './Channel.js';\nimport { ChannelParentMixin } from './mixins/ChannelParentMixin.js';\nimport { ChannelPermissionMixin } from './mixins/ChannelPermissionMixin.js';\nimport { ChannelSlowmodeMixin } from './mixins/ChannelSlowmodeMixin.js';\nimport { ChannelWebhookMixin } from './mixins/ChannelWebhookMixin.js';\nimport { VoiceChannelMixin } from './mixins/VoiceChannelMixin.js';\n\nexport interface VoiceChannel<Omitted extends keyof APIGuildVoiceChannel | '' = ''> extends MixinTypes<\n\tChannel<ChannelType.GuildVoice>,\n\t[\n\t\tChannelParentMixin<ChannelType.GuildVoice>,\n\t\tChannelPermissionMixin<ChannelType.GuildVoice>,\n\t\tChannelSlowmodeMixin<ChannelType.GuildVoice>,\n\t\tChannelWebhookMixin<ChannelType.GuildVoice>,\n\t\tVoiceChannelMixin<ChannelType.GuildVoice>,\n\t]\n> {}\n\nexport class VoiceChannel<Omitted extends keyof APIGuildVoiceChannel | '' = ''> extends Channel<\n\tChannelType.GuildVoice,\n\tOmitted\n> {\n\tpublic constructor(data: Partialize<APIGuildVoiceChannel, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n}\n\nMixin(VoiceChannel, [\n\tChannelParentMixin,\n\tChannelPermissionMixin,\n\tChannelSlowmodeMixin,\n\tChannelWebhookMixin,\n\tVoiceChannelMixin,\n]);\n","import type { APIInteractionDataResolved } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents data for users, members, channels, and roles in the message's auto-populated select menus.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has substructures `User`, `Channel`, `Role`, `Message`, `GuildMember`, `Attachment`, which need to be instantiated and stored by an extending class using it\n */\nexport abstract class ResolvedInteractionData<\n\tOmitted extends keyof APIInteractionDataResolved | '' = '',\n> extends Structure<APIInteractionDataResolved, Omitted> {\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIInteractionDataResolved, Omitted>) {\n\t\tsuper(data);\n\t}\n}\n","import { type APIInvite, type APIExtendedInvite, RouteBases } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { dateToDiscordISOTimestamp } from '../utils/optimization.js';\nimport { kData, kExpiresTimestamp, kCreatedTimestamp } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\nexport interface APIActualInvite extends APIInvite, Partial<Omit<APIExtendedInvite, keyof APIInvite>> {}\n\n/**\n * Represents an invitation to a Discord channel\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class Invite<Omitted extends keyof APIActualInvite | '' = 'created_at' | 'expires_at'> extends Structure<\n\tAPIActualInvite,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each Invite\n\t *\n\t * @remarks This template has defaults, if you want to remove additional data and keep the defaults,\n\t * use `Object.defineProperties`. To override the defaults, set this value directly.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIActualInvite> = {\n\t\tset created_at(_: string) {},\n\t\tset expires_at(_: string) {},\n\t};\n\n\t/**\n\t * Optimized storage of {@link discord-api-types/v10#(APIActualInvite:interface).expires_at}\n\t *\n\t * @internal\n\t */\n\tprotected [kExpiresTimestamp]: number | null = null;\n\n\t/**\n\t * Optimized storage of {@link discord-api-types/v10#(APIActualInvite:interface).created_at}\n\t *\n\t * @internal\n\t */\n\tprotected [kCreatedTimestamp]: number | null = null;\n\n\t/**\n\t * @param data - The raw data received from the API for the invite\n\t */\n\tpublic constructor(data: Partialize<APIActualInvite, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.optimizeData}\n\t *\n\t * @internal\n\t */\n\tprotected override optimizeData(data: Partial<APIActualInvite>) {\n\t\tif (data.expires_at) {\n\t\t\tthis[kExpiresTimestamp] = Date.parse(data.expires_at);\n\t\t}\n\n\t\tif (data.created_at) {\n\t\t\tthis[kCreatedTimestamp] = Date.parse(data.created_at);\n\t\t}\n\t}\n\n\t/**\n\t * The code for this invite\n\t */\n\tpublic get code() {\n\t\treturn this[kData].code;\n\t}\n\n\t/**\n\t * The target type (for voice channel invites)\n\t */\n\tpublic get targetType() {\n\t\treturn this[kData].target_type;\n\t}\n\n\t/**\n\t * The type of this invite\n\t */\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n\n\t/**\n\t * The approximate number of online members of the guild this invite is for\n\t *\n\t * @remarks Only available when the invite was fetched from `GET /invites/<code>` with counts\n\t */\n\tpublic get approximatePresenceCount() {\n\t\treturn this[kData].approximate_presence_count;\n\t}\n\n\t/**\n\t * The approximate total number of members of the guild this invite is for\n\t *\n\t * @remarks Only available when the invite was fetched from `GET /invites/<code>` with counts\n\t */\n\tpublic get approximateMemberCount() {\n\t\treturn this[kData].approximate_member_count;\n\t}\n\n\t/**\n\t * The timestamp this invite will expire at\n\t */\n\tpublic get expiresTimestamp() {\n\t\tif (this[kExpiresTimestamp]) {\n\t\t\treturn this[kExpiresTimestamp];\n\t\t}\n\n\t\tconst createdTimestamp = this.createdTimestamp;\n\t\tconst maxAge = this.maxAge;\n\t\tif (createdTimestamp && maxAge) {\n\t\t\tthis[kExpiresTimestamp] = createdTimestamp + (maxAge as number) * 1_000;\n\t\t}\n\n\t\treturn this[kExpiresTimestamp];\n\t}\n\n\t/**\n\t * The time the invite will expire at\n\t */\n\tpublic get expiresAt() {\n\t\tconst expiresTimestamp = this.expiresTimestamp;\n\t\treturn expiresTimestamp ? new Date(expiresTimestamp) : null;\n\t}\n\n\t/**\n\t * The number of times this invite has been used\n\t */\n\tpublic get uses() {\n\t\treturn this[kData].uses;\n\t}\n\n\t/**\n\t * The maximum number of times this invite can be used\n\t */\n\tpublic get maxUses() {\n\t\treturn this[kData].max_uses;\n\t}\n\n\t/**\n\t * The maximum age of the invite, in seconds, 0 for non-expiring\n\t */\n\tpublic get maxAge() {\n\t\treturn this[kData].max_age;\n\t}\n\n\t/**\n\t * Whether this invite only grants temporary membership\n\t */\n\tpublic get temporary() {\n\t\treturn this[kData].temporary;\n\t}\n\n\t/**\n\t * The timestamp this invite was created at\n\t */\n\tpublic get createdTimestamp() {\n\t\treturn this[kCreatedTimestamp];\n\t}\n\n\t/**\n\t * The time the invite was created at\n\t */\n\tpublic get createdAt() {\n\t\tconst createdTimestamp = this.createdTimestamp;\n\t\treturn createdTimestamp ? new Date(createdTimestamp) : null;\n\t}\n\n\t/**\n\t * The URL to the invite\n\t */\n\tpublic get url() {\n\t\treturn this.code ? `${RouteBases.invite}/${this.code}` : null;\n\t}\n\n\t/**\n\t * When concatenated with a string, this automatically concatenates the invite's URL instead of the object.\n\t *\n\t * @returns The URL to the invite or an empty string if it doesn't have a code\n\t */\n\tpublic override toString() {\n\t\treturn this.url ?? '';\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.toJSON}\n\t */\n\tpublic override toJSON() {\n\t\tconst clone = super.toJSON();\n\t\tif (this[kExpiresTimestamp]) {\n\t\t\tclone.expires_at = dateToDiscordISOTimestamp(new Date(this[kExpiresTimestamp]));\n\t\t}\n\n\t\tif (this[kCreatedTimestamp]) {\n\t\t\tclone.created_at = dateToDiscordISOTimestamp(new Date(this[kCreatedTimestamp]));\n\t\t}\n\n\t\treturn clone;\n\t}\n\n\t/**\n\t * Returns the primitive value of the specified object.\n\t */\n\tpublic override valueOf() {\n\t\treturn this.code ?? super.valueOf();\n\t}\n}\n","export function extendTemplate<SuperTemplate extends Record<string, unknown>>(\n\tsuperTemplate: SuperTemplate,\n\tadditions: Record<string, unknown>,\n): Record<string, unknown> & SuperTemplate {\n\treturn Object.defineProperties(additions, Object.getOwnPropertyDescriptors(superTemplate)) as Record<\n\t\tstring,\n\t\tunknown\n\t> &\n\t\tSuperTemplate;\n}\n\n/**\n * Turns a JavaScript Date object into the timestamp format used by Discord in payloads.\n * E.g. `2025-11-16T14:09:25.239000+00:00`\n *\n * @private\n * @param date a Date instance\n * @returns an ISO8601 timestamp with microseconds precision and explicit +00:00 timezone\n */\nexport function dateToDiscordISOTimestamp(date: Date) {\n\treturn `${date.getUTCFullYear()}-${(date.getUTCMonth() + 1).toString().padStart(2, '0')}-${date.getUTCDate().toString().padStart(2, '0')}T${date.getUTCHours().toString().padStart(2, '0')}:${date.getUTCMinutes().toString().padStart(2, '0')}:${date.getUTCSeconds().toString().padStart(2, '0')}.${date.getUTCMilliseconds().toString().padEnd(6, '0')}+00:00`;\n}\n","import type { APIBaseComponent, APIMessageComponent, APIModalComponent, ComponentType } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\n/**\n * The data stored by a {@link Component} structure based on its {@link (Component:class).\"type\"} property.\n */\nexport type ComponentDataType<Type extends ComponentType | 'unknown'> = Type extends ComponentType\n\t? Extract<APIMessageComponent | APIModalComponent, { type: Type }>\n\t: APIBaseComponent<ComponentType>;\nexport abstract class Component<\n\tType extends APIMessageComponent | APIModalComponent,\n\tOmitted extends keyof Type | '' = '',\n> extends Structure<Type, Omitted> {\n\t/**\n\t * @param data - The raw data received from the API for the component\n\t */\n\tpublic constructor(data: Partialize<Type, Omitted>) {\n\t\tsuper(data as Type);\n\t}\n\n\t/**\n\t * 32 bit integer used as an optional identifier for component\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The type of the component\n\t */\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n}\n","import type { APIActionRowComponent, APIComponentInActionRow, ComponentType } from 'discord-api-types/v10';\nimport type { Partialize } from '../../utils/types.js';\nimport type { ComponentDataType } from './Component.js';\nimport { Component } from './Component.js';\n\n/**\n * Represents an action row component on a message or modal.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has `Component`s as substructures which need to be instantiated and stored by an extending class using it\n */\nexport class ActionRowComponent<\n\tType extends APIComponentInActionRow,\n\tOmitted extends keyof APIActionRowComponent<Type> | '' = '',\n> extends Component<ComponentDataType<ComponentType.ActionRow>, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each ActionRowComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<ComponentDataType<ComponentType.ActionRow>> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the action row\n\t */\n\tpublic constructor(data: Partialize<ComponentDataType<ComponentType.ActionRow>, Omitted>) {\n\t\tsuper(data);\n\t}\n}\n","import type { APIButtonComponent, APIButtonComponentWithCustomId, ButtonStyle } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport { Component } from './Component.js';\n\n/**\n * The data stored by a {@link ButtonComponent} structure based on its {@link (ButtonComponent:class).\"style\"} property.\n */\nexport type ButtonDataType<Style extends ButtonStyle> = Style extends\n\t| ButtonStyle.Danger\n\t| ButtonStyle.Primary\n\t| ButtonStyle.Secondary\n\t| ButtonStyle.Success\n\t? APIButtonComponentWithCustomId\n\t: Extract<APIButtonComponent, { style: Style }>;\n\nexport abstract class ButtonComponent<\n\tStyle extends ButtonStyle,\n\tOmitted extends keyof ButtonDataType<Style> | '' = '',\n> extends Component<ButtonDataType<Style>, Omitted> {\n\t/**\n\t * @param data - The raw data received from the API for the button\n\t */\n\tpublic constructor(data: Partialize<ButtonDataType<Style>, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The style of the button\n\t */\n\tpublic get style() {\n\t\treturn this[kData].style;\n\t}\n\n\t/**\n\t * The status of the button\n\t */\n\tpublic get disabled() {\n\t\treturn typeof this[kData].disabled === 'boolean' ? this[kData].disabled : null;\n\t}\n}\n","import type { APISelectMenuComponent } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport { Component } from './Component.js';\n\nexport abstract class SelectMenuComponent<\n\tType extends APISelectMenuComponent,\n\tOmitted extends keyof Type | '' = '',\n> extends Component<Type, Omitted> {\n\t/**\n\t * @param data - The raw data received from the API for the select menu\n\t */\n\tpublic constructor(data: Partialize<Type, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The customId to be sent in the interaction when a selection is made\n\t */\n\tpublic get customId() {\n\t\treturn this[kData].custom_id;\n\t}\n\n\t/**\n\t * Whether the select menu is disabled\n\t */\n\tpublic get disabled() {\n\t\treturn this[kData].disabled;\n\t}\n\n\t/**\n\t * The maximum number of items that can be chosen\n\t */\n\tpublic get maxValues() {\n\t\treturn this[kData].max_values;\n\t}\n\n\t/**\n\t * The minimum number of items that must be chosen\n\t */\n\tpublic get minValues() {\n\t\treturn this[kData].min_values;\n\t}\n\n\t/**\n\t * Custom placeholder text if nothing is selected\n\t */\n\tpublic get placeholder() {\n\t\treturn this[kData].placeholder;\n\t}\n\n\t/**\n\t * Whether a selection is required\n\t */\n\tpublic get required() {\n\t\treturn this[kData].required;\n\t}\n}\n","import type { APIChannelSelectComponent, ChannelType } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport { SelectMenuComponent } from './SelectMenuComponent.js';\n\n/**\n * Represents a channel select menu component.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has `SelectMenuDefaultValue`s as substructures which need to be instantiated and stored by an extending class using it\n */\nexport class ChannelSelectMenuComponent<\n\tOmitted extends keyof APIChannelSelectComponent | '' = '',\n> extends SelectMenuComponent<APIChannelSelectComponent, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each ChannelSelectMenuComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIChannelSelectComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the channel select menu\n\t */\n\tpublic constructor(data: Partialize<APIChannelSelectComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The list of channel types to include in the channel select component\n\t */\n\tpublic get channelTypes() {\n\t\treturn Array.isArray(this[kData].channel_types) ? (this[kData].channel_types as readonly ChannelType[]) : null;\n\t}\n}\n","import type { APIContainerComponent } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport { Component } from './Component.js';\n\n/**\n * Represents a container component on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has `Component`s as substructures which need to be instantiated and stored by an extending class using it\n */\nexport class ContainerComponent<Omitted extends keyof APIContainerComponent | '' = ''> extends Component<\n\tAPIContainerComponent,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each ContainerComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIContainerComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the container\n\t */\n\tpublic constructor(data: Partialize<APIContainerComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * Color for the accent on the container as RGB\n\t */\n\tpublic get accentColor() {\n\t\treturn this[kData].accent_color;\n\t}\n\n\t/**\n\t * The hexadecimal version of the accent color, with a leading hash\n\t */\n\tpublic get hexAccentColor() {\n\t\tconst accentColor = this.accentColor;\n\t\tif (typeof accentColor !== 'number') return accentColor;\n\t\treturn `#${accentColor.toString(16).padStart(6, '0')}`;\n\t}\n\n\t/**\n\t * Whether the container should be a spoiler (or blurred out)\n\t */\n\tpublic get spoiler() {\n\t\treturn this[kData].spoiler;\n\t}\n}\n","import type { APIFileComponent } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport { Component } from './Component.js';\n\n/**\n * Represents a file component on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has a substructure `UnfurledMediaItem` which needs to be instantiated and stored by an extending class using it\n */\nexport class FileComponent<Omitted extends keyof APIFileComponent | '' = ''> extends Component<\n\tAPIFileComponent,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each FileComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIFileComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the file component\n\t */\n\tpublic constructor(data: Partialize<APIFileComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * Whether the media should be a spoiler (or blurred out)\n\t */\n\tpublic get spoiler() {\n\t\treturn this[kData].spoiler;\n\t}\n\n\t/**\n\t * The name of the file\n\t */\n\tpublic get name() {\n\t\treturn this[kData].name;\n\t}\n\n\t/**\n\t * The size of the file in bytes\n\t */\n\tpublic get size() {\n\t\treturn this[kData].size;\n\t}\n}\n","import type { APIFileUploadComponent } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport { Component } from './Component.js';\n\n/**\n * Represents a file upload component on a modal.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class FileUploadComponent<Omitted extends keyof APIFileUploadComponent | '' = ''> extends Component<\n\tAPIFileUploadComponent,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each FileUploadComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIFileUploadComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the file upload component\n\t */\n\tpublic constructor(data: Partialize<APIFileUploadComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The custom id to be sent in the interaction when the modal gets submitted\n\t */\n\tpublic get customId() {\n\t\treturn this[kData].custom_id;\n\t}\n\n\t/**\n\t * The maximum number of items that can be uploaded\n\t */\n\tpublic get maxValues() {\n\t\treturn this[kData].max_values;\n\t}\n\n\t/**\n\t * The minimum number of items that must be uploaded\n\t */\n\tpublic get minValues() {\n\t\treturn this[kData].min_values;\n\t}\n\n\t/**\n\t * Whether the file upload requires files to be uploaded before submitting the modal\n\t */\n\tpublic get required() {\n\t\treturn this[kData].required;\n\t}\n}\n","import type { ButtonStyle } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport type { ButtonDataType } from './ButtonComponent.js';\nimport { ButtonComponent } from './ButtonComponent.js';\n\n/**\n * Base class for all buttons that can have a label on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has a substructure `ComponentEmoji` which needs to be instantiated and stored by an extending class using it\n */\nexport abstract class LabeledButtonComponent<\n\tStyle extends Exclude<ButtonStyle, ButtonStyle.Premium>,\n\tOmitted extends keyof ButtonDataType<Style> | '' = '',\n> extends ButtonComponent<Style, Omitted> {\n\t/**\n\t * @param data - The raw data received from the API for the button\n\t */\n\tpublic constructor(data: Partialize<ButtonDataType<Style>, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The label to be displayed on the button\n\t */\n\tpublic get label() {\n\t\treturn this[kData].label;\n\t}\n}\n","import type { APIButtonComponentWithCustomId, ButtonStyle } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport type { ButtonDataType } from './ButtonComponent.js';\nimport { LabeledButtonComponent } from './LabeledButtonComponent.js';\n\n/**\n * Represents a button causing a message component interaction on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class InteractiveButtonComponent<\n\tStyle extends ButtonStyle.Danger | ButtonStyle.Primary | ButtonStyle.Secondary | ButtonStyle.Success,\n\tOmitted extends keyof APIButtonComponentWithCustomId | '' = '',\n> extends LabeledButtonComponent<Style, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each InteractiveButtonComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIButtonComponentWithCustomId> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the interactive button\n\t */\n\tpublic constructor(data: Partialize<APIButtonComponentWithCustomId, Omitted>) {\n\t\tsuper(data as ButtonDataType<Style>);\n\t}\n\n\t/**\n\t * The custom id to be sent in the interaction when clicked\n\t */\n\tpublic get customId() {\n\t\treturn this[kData].custom_id;\n\t}\n}\n","import type { APIButtonComponentWithURL, ButtonStyle } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport { LabeledButtonComponent } from './LabeledButtonComponent.js';\n\n/**\n * Represents a button linking to an URL on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class LinkButtonComponent<\n\tOmitted extends keyof APIButtonComponentWithURL | '' = '',\n> extends LabeledButtonComponent<ButtonStyle.Link, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each LinkButtonComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIButtonComponentWithURL> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the link button\n\t */\n\tpublic constructor(data: Partialize<APIButtonComponentWithURL, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The URL to direct users to when clicked\n\t */\n\tpublic get url() {\n\t\treturn this[kData].url;\n\t}\n}\n","import type { APIMediaGalleryComponent } from 'discord-api-types/v10';\nimport type { Partialize } from '../../utils/types.js';\nimport { Component } from './Component.js';\n\n/**\n * Represents a media gallery component on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has `MediaGalleryItem`s as substructures which need to be instantiated and stored by an extending class using it\n */\nexport class MediaGalleryComponent<Omitted extends keyof APIMediaGalleryComponent | '' = ''> extends Component<\n\tAPIMediaGalleryComponent,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each MediaGalleryComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIMediaGalleryComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the media gallery\n\t */\n\tpublic constructor(data: Partialize<APIMediaGalleryComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n}\n","import type { APIMentionableSelectComponent } from 'discord-api-types/v10';\nimport type { Partialize } from '../../utils/types.js';\nimport { SelectMenuComponent } from './SelectMenuComponent.js';\n\n/**\n * Represents a mentionable select menu component.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has `SelectMenuDefaultValue`s as substructures which need to be instantiated and stored by an extending class using it\n */\nexport class MentionableSelectMenuComponent<\n\tOmitted extends keyof APIMentionableSelectComponent | '' = '',\n> extends SelectMenuComponent<APIMentionableSelectComponent, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each MentionableSelectMenuComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIMentionableSelectComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the mentionable select menu\n\t */\n\tpublic constructor(data: Partialize<APIMentionableSelectComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n}\n","import type { APIButtonComponentWithSKUId, ButtonStyle } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport { ButtonComponent } from './ButtonComponent.js';\n\n/**\n * Represents a button used to buy an SKU from a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class PremiumButtonComponent<\n\tOmitted extends keyof APIButtonComponentWithSKUId | '' = '',\n> extends ButtonComponent<ButtonStyle.Premium, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each PremiumButtonComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIButtonComponentWithSKUId> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the premium button\n\t */\n\tpublic constructor(data: Partialize<APIButtonComponentWithSKUId, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id for a purchasable SKU\n\t */\n\tpublic get skuId() {\n\t\treturn this[kData].sku_id;\n\t}\n}\n","import type { APIRoleSelectComponent } from 'discord-api-types/v10';\nimport type { Partialize } from '../../utils/types.js';\nimport { SelectMenuComponent } from './SelectMenuComponent.js';\n\n/**\n * Represents a role select menu component.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has `SelectMenuDefaultValue`s as substructures which need to be instantiated and stored by an extending class using it\n */\nexport class RoleSelectMenuComponent<\n\tOmitted extends keyof APIRoleSelectComponent | '' = '',\n> extends SelectMenuComponent<APIRoleSelectComponent, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each RoleSelectMenuComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIRoleSelectComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the role select menu\n\t */\n\tpublic constructor(data: Partialize<APIRoleSelectComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n}\n","import type { APISectionComponent } from 'discord-api-types/v10';\nimport type { Partialize } from '../../utils/types.js';\nimport { Component } from './Component.js';\n\n/**\n * Represents a section component on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has `Component`s as substructures which need to be instantiated and stored by an extending class using it\n */\nexport class SectionComponent<Omitted extends keyof APISectionComponent | '' = ''> extends Component<\n\tAPISectionComponent,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each SectionComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APISectionComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the section\n\t */\n\tpublic constructor(data: Partialize<APISectionComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n}\n","import type { APISeparatorComponent } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport { Component } from './Component.js';\n\n/**\n * Represents a separator component on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class SeparatorComponent<Omitted extends keyof APISeparatorComponent | '' = ''> extends Component<\n\tAPISeparatorComponent,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each SeparatorComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APISeparatorComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the separator\n\t */\n\tpublic constructor(data: Partialize<APISeparatorComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * Whether a visual divider should be displayed in the component\n\t */\n\tpublic get divider() {\n\t\treturn this[kData].divider;\n\t}\n\n\t/**\n\t * The size of the separator padding\n\t */\n\tpublic get spacing() {\n\t\treturn this[kData].spacing;\n\t}\n}\n","import type { APIStringSelectComponent } from 'discord-api-types/v10';\nimport type { Partialize } from '../../utils/types.js';\nimport { SelectMenuComponent } from './SelectMenuComponent.js';\n\n/**\n * Represents a string select menu component.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has `StringSelectMenuOption`s as substructures which need to be instantiated and stored by an extending class using it\n */\nexport class StringSelectMenuComponent<\n\tOmitted extends keyof APIStringSelectComponent | '' = '',\n> extends SelectMenuComponent<APIStringSelectComponent, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each StringSelectMenuComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIStringSelectComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the string select menu\n\t */\n\tpublic constructor(data: Partialize<APIStringSelectComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n}\n","import type { APITextDisplayComponent } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport { Component } from './Component.js';\n\n/**\n * Represents a text display component on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class TextDisplayComponent<Omitted extends keyof APITextDisplayComponent | '' = ''> extends Component<\n\tAPITextDisplayComponent,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each TextDisplayComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APITextDisplayComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the text display\n\t */\n\tpublic constructor(data: Partialize<APITextDisplayComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * Text that will be displayed similar to a message\n\t */\n\tpublic get content() {\n\t\treturn this[kData].content;\n\t}\n}\n","import type { APITextInputComponent } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport { Component } from './Component.js';\n\n/**\n * Represents a text input component on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class TextInputComponent<Omitted extends keyof APITextInputComponent | '' = ''> extends Component<\n\tAPITextInputComponent,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each TextInputComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APITextInputComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the text input\n\t */\n\tpublic constructor(data: Partialize<APITextInputComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The custom id for the text input\n\t */\n\tpublic get customId() {\n\t\treturn this[kData].custom_id;\n\t}\n\n\t/**\n\t * Text that appears on top of the text input field\n\t */\n\tpublic get label() {\n\t\treturn this[kData].label;\n\t}\n\n\t/**\n\t * The maximal length of text input\n\t */\n\tpublic get maxLength() {\n\t\treturn this[kData].max_length;\n\t}\n\n\t/**\n\t * The minimal length of text input\n\t */\n\tpublic get minLength() {\n\t\treturn this[kData].min_length;\n\t}\n\n\t/**\n\t * The placeholder for the text input\n\t */\n\tpublic get placeholder() {\n\t\treturn this[kData].placeholder;\n\t}\n\n\t/**\n\t * Whether this text input is required\n\t */\n\tpublic get required() {\n\t\treturn this[kData].required;\n\t}\n\n\t/**\n\t * One of text input styles\n\t */\n\tpublic get style() {\n\t\treturn this[kData].style;\n\t}\n\n\t/**\n\t * The pre-filled text in the text input\n\t */\n\tpublic get value() {\n\t\treturn this[kData].value;\n\t}\n}\n","import type { APIThumbnailComponent } from 'discord-api-types/v10';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\nimport { Component } from './Component.js';\n\n/**\n * Represents a thumbnail component on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has a substructure `UnfurledMediaItem` which needs to be instantiated and stored by an extending class using it\n */\nexport class ThumbnailComponent<Omitted extends keyof APIThumbnailComponent | '' = ''> extends Component<\n\tAPIThumbnailComponent,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each ThumbnailComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIThumbnailComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the thumbnail\n\t */\n\tpublic constructor(data: Partialize<APIThumbnailComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * Alt text for the media\n\t */\n\tpublic get description() {\n\t\treturn this[kData].description;\n\t}\n\n\t/**\n\t * Whether the thumbnail should be a spoiler (or blurred out)\n\t */\n\tpublic get spoiler() {\n\t\treturn this[kData].spoiler;\n\t}\n}\n","import type { APIUserSelectComponent } from 'discord-api-types/v10';\nimport type { Partialize } from '../../utils/types.js';\nimport { SelectMenuComponent } from './SelectMenuComponent.js';\n\n/**\n * Represents a user select menu component.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has `SelectMenuDefaultValue`s as substructures which need to be instantiated and stored by an extending class using it\n */\nexport class UserSelectMenuComponent<\n\tOmitted extends keyof APIUserSelectComponent | '' = '',\n> extends SelectMenuComponent<APIUserSelectComponent, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each UserSelectMenuComponent.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIUserSelectComponent> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the user select menu\n\t */\n\tpublic constructor(data: Partialize<APIUserSelectComponent, Omitted>) {\n\t\tsuper(data);\n\t}\n}\n","import type { APIMessageComponentEmoji } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\nexport class ComponentEmoji<Omitted extends keyof APIMessageComponentEmoji | '' = ''> extends Structure<\n\tAPIMessageComponentEmoji,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each ComponentEmoji.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIMessageComponentEmoji> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the component emoji\n\t */\n\tpublic constructor(data: Partialize<APIMessageComponentEmoji, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the emoji\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The name of the emoji\n\t */\n\tpublic get name() {\n\t\treturn this[kData].name;\n\t}\n\n\t/**\n\t * Whether this emoji is animated\n\t */\n\tpublic get animated() {\n\t\treturn this[kData].animated;\n\t}\n}\n","import type { APIMediaGalleryItem } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\n/**\n * Represents an item in a media gallery on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has a substructure `UnfurledMediaItem` which needs to be instantiated and stored by an extending class using it\n */\nexport class MediaGalleryItem<Omitted extends keyof APIMediaGalleryItem | '' = ''> extends Structure<\n\tAPIMediaGalleryItem,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each MediaGalleryItem.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIMediaGalleryItem> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the media gallery item\n\t */\n\tpublic constructor(data: Partialize<APIMediaGalleryItem, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * Alt text for the media\n\t */\n\tpublic get description() {\n\t\treturn this[kData].description;\n\t}\n\n\t/**\n\t * Whether the media should be a spoiler (or blurred out)\n\t */\n\tpublic get spoiler() {\n\t\treturn this[kData].spoiler;\n\t}\n}\n","import type { APISelectMenuDefaultValue, SelectMenuDefaultValueType } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\nexport class SelectMenuDefaultValue<\n\tType extends SelectMenuDefaultValueType,\n\tOmitted extends keyof APISelectMenuDefaultValue<Type> | '' = '',\n> extends Structure<APISelectMenuDefaultValue<Type>, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each SelectMenuDefaultValue.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APISelectMenuDefaultValue<SelectMenuDefaultValueType>> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the select menu default value\n\t */\n\tpublic constructor(data: Partialize<APISelectMenuDefaultValue<Type>, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n}\n","import type { APISelectMenuOption } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\n/**\n * Represents an option in a string select menu component.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has a substructure `ComponentEmoji` which needs to be instantiated and stored by an extending class using it\n */\nexport class StringSelectMenuOption<Omitted extends keyof APISelectMenuOption | '' = ''> extends Structure<\n\tAPISelectMenuOption,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each StringSelectMenuOption.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APISelectMenuOption> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the string select menu option\n\t */\n\tpublic constructor(data: Partialize<APISelectMenuOption, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * Whether this option should be already-selected by default\n\t */\n\tpublic get default() {\n\t\treturn this[kData].default;\n\t}\n\n\t/**\n\t * An additional description of the option\n\t */\n\tpublic get description() {\n\t\treturn this[kData].description;\n\t}\n\n\t/**\n\t * The user-facing name of the option\n\t */\n\tpublic get label() {\n\t\treturn this[kData].label;\n\t}\n\n\t/**\n\t * The dev-defined value of the option\n\t */\n\tpublic get value() {\n\t\treturn this[kData].value;\n\t}\n}\n","import type { APIUnfurledMediaItem } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\n// TODO: add `flags` as a BitField class and appropriate getter, once it gets properly documented\n\n/**\n * Represents a media item in a component on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class UnfurledMediaItem<Omitted extends keyof APIUnfurledMediaItem | '' = ''> extends Structure<\n\tAPIUnfurledMediaItem,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each UnfurledMediaItem.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIUnfurledMediaItem> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the unfurled media item\n\t */\n\tpublic constructor(data: Partialize<APIUnfurledMediaItem, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the uploaded attachment\n\t */\n\tpublic get attachmentId() {\n\t\treturn this[kData].attachment_id;\n\t}\n\n\t/**\n\t * The media type of the content\n\t */\n\tpublic get contentType() {\n\t\treturn this[kData].content_type;\n\t}\n\n\t/**\n\t * The height of the media item (if image)\n\t */\n\tpublic get height() {\n\t\treturn this[kData].height;\n\t}\n\n\t/**\n\t * The proxied URL of the media item\n\t */\n\tpublic get proxyURL() {\n\t\treturn this[kData].proxy_url;\n\t}\n\n\t/**\n\t * Supports arbitrary URLs and attachment:// references\n\t */\n\tpublic get url() {\n\t\treturn this[kData].url;\n\t}\n\n\t/**\n\t * The width of the media item (if image)\n\t */\n\tpublic get width() {\n\t\treturn this[kData].width;\n\t}\n}\n","import type { APIEmbed } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { dateToDiscordISOTimestamp } from '../../utils/optimization.js';\nimport { kCreatedTimestamp, kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\n/**\n * Represents an embed on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has substructures `EmbedAuthor`, `EmbedFooter`, `EmbedField`, `EmbedImage`, `EmbedThumbnail`, `EmbedProvider`, `EmbedVideo` which need to be instantiated and stored by an extending class using it\n */\nexport class Embed<Omitted extends keyof APIEmbed | '' = ''> extends Structure<APIEmbed, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each Embed.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIEmbed> = {\n\t\tset timestamp(_: string) {},\n\t};\n\n\tprotected [kCreatedTimestamp]: number | null = null;\n\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIEmbed, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.optimizeData}\n\t *\n\t * @internal\n\t */\n\tprotected override optimizeData(data: Partial<APIEmbed>) {\n\t\tif (data.timestamp) {\n\t\t\tthis[kCreatedTimestamp] = Date.parse(data.timestamp);\n\t\t}\n\t}\n\n\t/**\n\t * The color code of the embed\n\t */\n\tpublic get color() {\n\t\treturn this[kData].color;\n\t}\n\n\t/**\n\t * The hexadecimal version of the embed color, with a leading hash\n\t */\n\tpublic get hexColor() {\n\t\tconst color = this.color;\n\t\tif (typeof color !== 'number') return color;\n\t\treturn `#${color.toString(16).padStart(6, '0')}`;\n\t}\n\n\t/**\n\t * The description of the embed\n\t */\n\tpublic get description() {\n\t\treturn this[kData].description;\n\t}\n\n\t/**\n\t * THe title of the embed\n\t */\n\tpublic get title() {\n\t\treturn this[kData].title;\n\t}\n\n\t/**\n\t * The timestamp of the embed content\n\t */\n\tpublic get timestamp() {\n\t\treturn this[kCreatedTimestamp];\n\t}\n\n\t/**\n\t * The type of embed (always \"rich\" for webhook embeds)\n\t */\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n\n\t/**\n\t * The URL of the embed\n\t */\n\tpublic get url() {\n\t\treturn this[kData].url;\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.toJSON}\n\t */\n\tpublic override toJSON() {\n\t\tconst clone = super.toJSON();\n\t\tif (this[kCreatedTimestamp]) {\n\t\t\tclone.timestamp = dateToDiscordISOTimestamp(new Date(this[kCreatedTimestamp]));\n\t\t}\n\n\t\treturn clone;\n\t}\n}\n","import type { APIEmbedAuthor } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\n/**\n * Represents author data in an embed on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class EmbedAuthor<Omitted extends keyof APIEmbedAuthor | '' = ''> extends Structure<APIEmbedAuthor, Omitted> {\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIEmbedAuthor, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The name of the author\n\t */\n\tpublic get name() {\n\t\treturn this[kData].name;\n\t}\n\n\t/**\n\t * The URL of author icon\n\t */\n\tpublic get iconURL() {\n\t\treturn this[kData].icon_url;\n\t}\n\n\t/**\n\t * A proxied URL of author icon\n\t */\n\tpublic get proxyIconURL() {\n\t\treturn this[kData].proxy_icon_url;\n\t}\n\n\t/**\n\t * The URL of the author\n\t */\n\tpublic get url() {\n\t\treturn this[kData].url;\n\t}\n}\n","import type { APIEmbedField } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\n/**\n * Represents a field's data in an embed on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class EmbedField<Omitted extends keyof APIEmbedField | '' = ''> extends Structure<APIEmbedField, Omitted> {\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIEmbedField, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The name of the field\n\t */\n\tpublic get name() {\n\t\treturn this[kData].name;\n\t}\n\n\t/**\n\t * The value of the field\n\t */\n\tpublic get value() {\n\t\treturn this[kData].value;\n\t}\n\n\t/**\n\t * Whether this field should display inline\n\t */\n\tpublic get inline() {\n\t\treturn this[kData].inline;\n\t}\n}\n","import type { APIEmbedFooter } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\n/**\n * Represents footer data in an embed on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class EmbedFooter<Omitted extends keyof APIEmbedFooter | '' = ''> extends Structure<APIEmbedFooter, Omitted> {\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIEmbedFooter, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The footer text\n\t */\n\tpublic get text() {\n\t\treturn this[kData].text;\n\t}\n\n\t/**\n\t * The URL of the footer icon\n\t */\n\tpublic get iconURL() {\n\t\treturn this[kData].icon_url;\n\t}\n\n\t/**\n\t * A proxied URL of the footer icon\n\t */\n\tpublic get proxyIconURL() {\n\t\treturn this[kData].proxy_icon_url;\n\t}\n}\n","import type { APIEmbedImage } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\n/**\n * Represents image data in an embed on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class EmbedImage<Omitted extends keyof APIEmbedImage | '' = ''> extends Structure<APIEmbedImage, Omitted> {\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIEmbedImage, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The height of the image\n\t */\n\tpublic get height() {\n\t\treturn this[kData].height;\n\t}\n\n\t/**\n\t * The width of the image\n\t */\n\tpublic get width() {\n\t\treturn this[kData].width;\n\t}\n\n\t/**\n\t * A proxied URL of the image\n\t */\n\tpublic get proxyURL() {\n\t\treturn this[kData].proxy_url;\n\t}\n\n\t/**\n\t * Source URL of the image\n\t */\n\tpublic get url() {\n\t\treturn this[kData].url;\n\t}\n}\n","import type { APIEmbedProvider } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\n/**\n * Represents provider data in an embed on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class EmbedProvider<Omitted extends keyof APIEmbedProvider | '' = ''> extends Structure<\n\tAPIEmbedProvider,\n\tOmitted\n> {\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIEmbedProvider, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The name of the provider\n\t */\n\tpublic get name() {\n\t\treturn this[kData].name;\n\t}\n\n\t/**\n\t * The URL of the provider\n\t */\n\tpublic get url() {\n\t\treturn this[kData].url;\n\t}\n}\n","import type { APIEmbedThumbnail } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\n/**\n * Represents thumbnail data in an embed on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class EmbedThumbnail<Omitted extends keyof APIEmbedThumbnail | '' = ''> extends Structure<\n\tAPIEmbedThumbnail,\n\tOmitted\n> {\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIEmbedThumbnail, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The height of the thumbnail\n\t */\n\tpublic get height() {\n\t\treturn this[kData].height;\n\t}\n\n\t/**\n\t * The width of the thumbnail\n\t */\n\tpublic get width() {\n\t\treturn this[kData].width;\n\t}\n\n\t/**\n\t * A proxied URL of the thumbnail\n\t */\n\tpublic get proxyURL() {\n\t\treturn this[kData].proxy_url;\n\t}\n\n\t/**\n\t * The source URL of the thumbnail\n\t */\n\tpublic get url() {\n\t\treturn this[kData].url;\n\t}\n}\n","import type { APIEmbedVideo } from 'discord-api-types/v10';\nimport { Structure } from '../../Structure.js';\nimport { kData } from '../../utils/symbols.js';\nimport type { Partialize } from '../../utils/types.js';\n\n/**\n * Represents video data in an embed on a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class EmbedVideo<Omitted extends keyof APIEmbedVideo | '' = ''> extends Structure<APIEmbedVideo, Omitted> {\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIEmbedVideo, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The height of the video\n\t */\n\tpublic get height() {\n\t\treturn this[kData].height;\n\t}\n\n\t/**\n\t * The width of the video\n\t */\n\tpublic get width() {\n\t\treturn this[kData].width;\n\t}\n\n\t/**\n\t * A proxied URL of the video\n\t */\n\tpublic get proxyURL() {\n\t\treturn this[kData].proxy_url;\n\t}\n\n\t/**\n\t * The source URL of the video\n\t */\n\tpublic get url() {\n\t\treturn this[kData].url;\n\t}\n}\n","import type { APIMessageInteractionMetadata, InteractionType } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\nexport type InteractionMetadataType<Type extends InteractionType> = Extract<\n\tAPIMessageInteractionMetadata,\n\t{ type: Type }\n>;\n\n/**\n * Represents metadata about the interaction causing a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has a substructure `User` which needs to be instantiated and stored by an extending class using it\n */\nexport abstract class InteractionMetadata<\n\tType extends InteractionType,\n\tOmitted extends keyof InteractionMetadataType<Type> | '' = '',\n> extends Structure<InteractionMetadataType<Type>, Omitted> {\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<InteractionMetadataType<Type>, Omitted>) {\n\t\tsuper(data as InteractionMetadataType<Type>);\n\t}\n\n\t/**\n\t * The id of the interaction\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The id of the original response message, present only on follow-up messages\n\t */\n\tpublic get originalResponseMessageId() {\n\t\treturn this[kData].original_response_message_id;\n\t}\n\n\t/**\n\t * The type of interaction\n\t */\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n}\n","import type { APIApplicationCommandInteractionMetadata, InteractionType } from 'discord-api-types/v10';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\nimport { InteractionMetadata } from './InteractionMetadata.js';\n\n/**\n * Represents metadata about the application command interaction causing a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has a substructure `User` which needs to be instantiated and stored by an extending class using it\n */\nexport class ApplicationCommandInteractionMetadata<\n\tOmitted extends keyof APIApplicationCommandInteractionMetadata | '' = '',\n> extends InteractionMetadata<InteractionType.ApplicationCommand, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each ApplicationCommandInteractionMetadata.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIApplicationCommandInteractionMetadata> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIApplicationCommandInteractionMetadata, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the message the command was run on\n\t */\n\tpublic get targetMessageId() {\n\t\treturn this[kData].target_message_id;\n\t}\n}\n","import type { APIAttachment, AttachmentFlags } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { AttachmentFlagsBitField } from '../bitfields/AttachmentFlagsBitField.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\nexport class Attachment<Omitted extends keyof APIAttachment | '' = ''> extends Structure<APIAttachment, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each Attachment.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIAttachment> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIAttachment, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the attachment\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The name of the attached file\n\t */\n\tpublic get filename() {\n\t\treturn this[kData].filename;\n\t}\n\n\t/**\n\t * The title of the file\n\t */\n\tpublic get title() {\n\t\treturn this[kData].title;\n\t}\n\n\t/**\n\t * The description for the file\n\t */\n\tpublic get description() {\n\t\treturn this[kData].description;\n\t}\n\n\t/**\n\t * The attachment's media type\n\t */\n\tpublic get contentType() {\n\t\treturn this[kData].content_type;\n\t}\n\n\t/**\n\t * The size of the file in bytes\n\t */\n\tpublic get size() {\n\t\treturn this[kData].size;\n\t}\n\n\t/**\n\t * The source URL of the file\n\t */\n\tpublic get url() {\n\t\treturn this[kData].url;\n\t}\n\n\t/**\n\t * A proxied URL of the file\n\t */\n\tpublic get proxyURL() {\n\t\treturn this[kData].proxy_url;\n\t}\n\n\t/**\n\t * The height of the file (if image)\n\t */\n\tpublic get height() {\n\t\treturn this[kData].height;\n\t}\n\n\t/**\n\t * The width of the file (if image)\n\t */\n\tpublic get width() {\n\t\treturn this[kData].width;\n\t}\n\n\t/**\n\t * Whether this attachment is ephemeral\n\t */\n\tpublic get ephemeral() {\n\t\treturn this[kData].ephemeral;\n\t}\n\n\t/**\n\t * The duration of the audio file\n\t */\n\tpublic get durationSecs() {\n\t\treturn this[kData].duration_secs;\n\t}\n\n\t/**\n\t * Base64 encoded bytearray representing a sampled waveform\n\t */\n\tpublic get waveform() {\n\t\treturn this[kData].waveform;\n\t}\n\n\t/**\n\t * Attachment flags combined as a bitfield\n\t */\n\tpublic get flags() {\n\t\tconst flags = this[kData].flags;\n\t\treturn flags ? new AttachmentFlagsBitField(this[kData].flags as AttachmentFlags) : null;\n\t}\n}\n","import type { APIChannelMention } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents the mention of a channel on a message on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class ChannelMention<Omitted extends keyof APIChannelMention | '' = ''> extends Structure<\n\tAPIChannelMention,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each ChannelMention.\n\t */\n\tpublic static override DataTemplate: Partial<APIChannelMention> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the channel mention\n\t */\n\tpublic constructor(data: Partialize<APIChannelMention, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The type of the mentioned channel\n\t */\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n\n\t/**\n\t * The name of the mentioned channel\n\t */\n\tpublic get name() {\n\t\treturn this[kData].name;\n\t}\n\n\t/**\n\t * The id of the mentioned channel\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The id of the guild the mentioned channel is in\n\t */\n\tpublic get guildId() {\n\t\treturn this[kData].guild_id;\n\t}\n}\n","import { DiscordSnowflake } from '@sapphire/snowflake';\nimport type { APIMessage, MessageFlags } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { MessageFlagsBitField } from '../bitfields/MessageFlagsBitField.js';\nimport { dateToDiscordISOTimestamp } from '../utils/optimization.js';\nimport { kData, kEditedTimestamp } from '../utils/symbols.js';\nimport { isIdSet } from '../utils/type-guards.js';\nimport type { Partialize } from '../utils/types.js';\n\n// TODO: missing substructures: application\n\n/**\n * Represents a message on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has substructures `Message`, `Channel`, `MessageActivity`, `MessageCall`, `MessageReference`, `Attachment`, `Application`, `ChannelMention`, `Reaction`, `Poll`, `ResolvedInteractionData`, `RoleSubscriptionData`, `Sticker`, all the different `Component`s, ... which need to be instantiated and stored by an extending class using it\n */\nexport class Message<Omitted extends keyof APIMessage | '' = 'edited_timestamp' | 'timestamp'> extends Structure<\n\tAPIMessage,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each Message\n\t */\n\tpublic static override DataTemplate: Partial<APIMessage> = {\n\t\tset timestamp(_: string) {},\n\t\tset edited_timestamp(_: string) {},\n\t};\n\n\tprotected [kEditedTimestamp]: number | null = null;\n\n\t/**\n\t * @param data - The raw data received from the API for the message\n\t */\n\tpublic constructor(data: Partialize<APIMessage, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.optimizeData}\n\t *\n\t * @internal\n\t */\n\tprotected override optimizeData(data: Partial<APIMessage>) {\n\t\tif (data.edited_timestamp) {\n\t\t\tthis[kEditedTimestamp] = Date.parse(data.edited_timestamp);\n\t\t}\n\t}\n\n\t/**\n\t * The message's id\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The id of the interaction's application, if this message is a reply to an interaction\n\t */\n\tpublic get applicationId() {\n\t\treturn this[kData].application_id;\n\t}\n\n\t/**\n\t * The channel's id this message was sent in\n\t */\n\tpublic get channelId() {\n\t\treturn this[kData].channel_id;\n\t}\n\n\t/**\n\t * The timestamp this message was created at\n\t */\n\tpublic get createdTimestamp() {\n\t\treturn isIdSet(this.id) ? DiscordSnowflake.timestampFrom(this.id) : null;\n\t}\n\n\t/**\n\t * The time the message was created at\n\t */\n\tpublic get createdAt() {\n\t\tconst createdTimestamp = this.createdTimestamp;\n\t\treturn createdTimestamp ? new Date(createdTimestamp) : null;\n\t}\n\n\t/**\n\t * The content of the message\n\t */\n\tpublic get content() {\n\t\treturn this[kData].content;\n\t}\n\n\t/**\n\t * The timestamp this message was last edited at, or `null` if it never was edited\n\t */\n\tpublic get editedTimestamp() {\n\t\treturn this[kEditedTimestamp];\n\t}\n\n\t/**\n\t * The time the message was last edited at, or `null` if it never was edited\n\t */\n\tpublic get editedAt() {\n\t\tconst editedTimestamp = this.editedTimestamp;\n\t\treturn editedTimestamp ? new Date(editedTimestamp) : null;\n\t}\n\n\t/**\n\t * The flags of this message as a bit field\n\t */\n\tpublic get flags() {\n\t\tconst flags = this[kData].flags;\n\t\treturn flags ? new MessageFlagsBitField(this[kData].flags as MessageFlags) : null;\n\t}\n\n\t/**\n\t * The nonce used when sending this message.\n\t *\n\t * @remarks This is only present in MESSAGE_CREATE event, if a nonce was provided when sending\n\t */\n\tpublic get nonce() {\n\t\treturn this[kData].nonce;\n\t}\n\n\t/**\n\t * Whether this message is pinned in its channel\n\t */\n\tpublic get pinned() {\n\t\treturn this[kData].pinned;\n\t}\n\n\t/**\n\t * A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread\n\t * It can be used to estimate the relative position of the message in a thread in company with `totalMessageSent` on parent thread\n\t */\n\tpublic get position() {\n\t\treturn this[kData].position;\n\t}\n\n\t/**\n\t * Whether this message was a TTS message\n\t */\n\tpublic get tts() {\n\t\treturn this[kData].tts;\n\t}\n\n\t/**\n\t * The type of message\n\t */\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n\n\t/**\n\t * If the message is generated by a webhook, this is the webhook's id\n\t */\n\tpublic get webhookId() {\n\t\treturn this[kData].webhook_id;\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.toJSON}\n\t */\n\tpublic override toJSON() {\n\t\tconst clone = super.toJSON();\n\t\tif (this[kEditedTimestamp]) {\n\t\t\tclone.edited_timestamp = dateToDiscordISOTimestamp(new Date(this[kEditedTimestamp]));\n\t\t}\n\n\t\tconst createdAt = this.createdAt;\n\t\tif (createdAt) {\n\t\t\tclone.timestamp = dateToDiscordISOTimestamp(createdAt);\n\t\t}\n\n\t\treturn clone;\n\t}\n}\n","import type { APIMessageActivity } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\nexport class MessageActivity<Omitted extends keyof APIMessageActivity | '' = ''> extends Structure<\n\tAPIMessageActivity,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each MessageActivity.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIMessageActivity> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIMessageActivity, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The party id from a Rich Presence event\n\t */\n\tpublic get partyId() {\n\t\treturn this[kData].party_id;\n\t}\n\n\t/**\n\t * The type of message activity\n\t */\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n}\n","import type { APIMessageCall } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { dateToDiscordISOTimestamp } from '../utils/optimization.js';\nimport { kEndedTimestamp } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\nexport class MessageCall<Omitted extends keyof APIMessageCall | '' = 'ended_timestamp'> extends Structure<\n\tAPIMessageCall,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each MessageCall\n\t */\n\tpublic static override DataTemplate: Partial<APIMessageCall> = {\n\t\tset ended_timestamp(_: string) {},\n\t};\n\n\tprotected [kEndedTimestamp]: number | null = null;\n\n\t/**\n\t * @param data - The raw data received from the API for the message call\n\t */\n\tpublic constructor(data: Partialize<APIMessageCall, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.optimizeData}\n\t *\n\t * @internal\n\t */\n\tprotected override optimizeData(data: Partial<APIMessageCall>) {\n\t\tif (data.ended_timestamp) {\n\t\t\tthis[kEndedTimestamp] = Date.parse(data.ended_timestamp);\n\t\t}\n\t}\n\n\t/**\n\t * The timestamp this call ended at, or `null` if it didn't end yet\n\t */\n\tpublic get endedTimestamp() {\n\t\treturn this[kEndedTimestamp];\n\t}\n\n\t/**\n\t * The time the call ended at, or `null` if it didn't end yet\n\t */\n\tpublic get endedAt() {\n\t\tconst endedTimestamp = this.endedTimestamp;\n\t\treturn endedTimestamp ? new Date(endedTimestamp) : null;\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.toJSON}\n\t */\n\tpublic override toJSON() {\n\t\tconst clone = super.toJSON();\n\t\tif (this[kEndedTimestamp]) {\n\t\t\tclone.ended_timestamp = dateToDiscordISOTimestamp(new Date(this[kEndedTimestamp]));\n\t\t}\n\n\t\treturn clone;\n\t}\n}\n","import type { APIMessageComponentInteractionMetadata, InteractionType } from 'discord-api-types/v10';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\nimport { InteractionMetadata } from './InteractionMetadata.js';\n\n/**\n * Represents metadata about the message component interaction causing a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class MessageComponentInteractionMetadata<\n\tOmitted extends keyof APIMessageComponentInteractionMetadata | '' = '',\n> extends InteractionMetadata<InteractionType.MessageComponent, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each MessageComponentInteractionMetadata.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIMessageComponentInteractionMetadata> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIMessageComponentInteractionMetadata, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the message that contained the interactive component\n\t */\n\tpublic get interactedMessageId() {\n\t\treturn this[kData].interacted_message_id;\n\t}\n}\n","import { MessageReferenceType, type APIMessageReference } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents the reference to another message on a message on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class MessageReference<Omitted extends keyof APIMessageReference | '' = ''> extends Structure<\n\tAPIMessageReference,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each MessageReference.\n\t */\n\tpublic static override DataTemplate: Partial<APIMessageReference> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the message reference\n\t */\n\tpublic constructor(data: Partialize<APIMessageReference, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The type of this reference\n\t */\n\tpublic get type() {\n\t\treturn 'type' in this[kData] ? (this[kData].type as MessageReferenceType) : MessageReferenceType.Default;\n\t}\n\n\t/**\n\t * The id of the referenced message\n\t */\n\tpublic get messageId() {\n\t\treturn this[kData].message_id;\n\t}\n\n\t/**\n\t * The id of the channel the referenced message was sent in\n\t */\n\tpublic get channelId() {\n\t\treturn this[kData].channel_id;\n\t}\n\n\t/**\n\t * The id of the guild the referenced message was sent in\n\t */\n\tpublic get guildId() {\n\t\treturn this[kData].guild_id;\n\t}\n}\n","import type { APIModalSubmitInteractionMetadata, InteractionType } from 'discord-api-types/v10';\nimport type { Partialize } from '../utils/types.js';\nimport { InteractionMetadata } from './InteractionMetadata.js';\n\n/**\n * Represents metadata about the modal submit interaction causing a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has a substructure `InteractionMetadata` which needs to be instantiated and stored by an extending class using it\n */\nexport class ModalSubmitInteractionMetadata<\n\tOmitted extends keyof APIModalSubmitInteractionMetadata | '' = '',\n> extends InteractionMetadata<InteractionType.ModalSubmit, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each ModalSubmitInteractionMetadata.\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIModalSubmitInteractionMetadata> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIModalSubmitInteractionMetadata, Omitted>) {\n\t\tsuper(data);\n\t}\n}\n","import type { APIReaction } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kBurstColors, kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents a reaction on a message on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has substructures `Emoji`, `ReactionCountDetails` which need to be instantiated and stored by an extending class using it\n */\nexport class Reaction<Omitted extends keyof APIReaction | '' = ''> extends Structure<APIReaction, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each Reaction.\n\t */\n\tpublic static override DataTemplate: Partial<APIReaction> = {\n\t\tset burst_colors(_: string[]) {},\n\t};\n\n\tprotected [kBurstColors]: number[] | null = null;\n\n\t/**\n\t * @param data - The raw data received from the API for the reaction\n\t */\n\tpublic constructor(data: Partialize<APIReaction, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.optimizeData}\n\t *\n\t * @internal\n\t */\n\tprotected override optimizeData(data: Partial<APIReaction>) {\n\t\tif (data.burst_colors) {\n\t\t\tthis[kBurstColors] = data.burst_colors.map((color) => Number.parseInt(color, 16));\n\t\t}\n\t}\n\n\t/**\n\t * The amount how often this emoji has been used to react (including super reacts)\n\t */\n\tpublic get count() {\n\t\treturn this[kData].count;\n\t}\n\n\t/**\n\t * Whether the current user has reacted using this emoji\n\t */\n\tpublic get me() {\n\t\treturn this[kData].me;\n\t}\n\n\t/**\n\t * Whether the current user has super-reacted using this emoji\n\t */\n\tpublic get meBurst() {\n\t\treturn this[kData].me_burst;\n\t}\n\n\t/**\n\t * The colors used for super reaction\n\t */\n\tpublic get burstColors() {\n\t\treturn this[kBurstColors];\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.toJSON}\n\t */\n\tpublic override toJSON() {\n\t\tconst clone = super.toJSON();\n\t\tif (this[kBurstColors]) {\n\t\t\tclone.burst_colors = this[kBurstColors].map((color) => `#${color.toString(16).padStart(6, '0')}`);\n\t\t}\n\n\t\treturn clone;\n\t}\n}\n","import type { APIReactionCountDetails } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents the usage count of a reaction on a message on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class ReactionCountDetails<Omitted extends keyof APIReactionCountDetails | '' = ''> extends Structure<\n\tAPIReactionCountDetails,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each ReactionCountDetails.\n\t */\n\tpublic static override DataTemplate: Partial<APIReactionCountDetails> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the reaction count details\n\t */\n\tpublic constructor(data: Partialize<APIReactionCountDetails, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The amount how often this emoji has been used to react (excluding super reacts)\n\t */\n\tpublic get normal() {\n\t\treturn this[kData].normal;\n\t}\n\n\t/**\n\t * The amount how often this emoji has been used to super-react\n\t */\n\tpublic get burst() {\n\t\treturn this[kData].burst;\n\t}\n}\n","import type { APIMessageRoleSubscriptionData } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents metadata about the role subscription causing a message.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport abstract class RoleSubscriptionData<\n\tOmitted extends keyof APIMessageRoleSubscriptionData | '' = '',\n> extends Structure<APIMessageRoleSubscriptionData, Omitted> {\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIMessageRoleSubscriptionData, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the SKU and listing the user is subscribed to\n\t */\n\tpublic get roleSubscriptionListingId() {\n\t\treturn this[kData].role_subscription_listing_id;\n\t}\n\n\t/**\n\t * The name of the tier the user is subscribed to\n\t */\n\tpublic get tierName() {\n\t\treturn this[kData].tier_name;\n\t}\n\n\t/**\n\t * The number of months the user has been subscribed for\n\t */\n\tpublic get totalMonthsSubscribed() {\n\t\treturn this[kData].total_months_subscribed;\n\t}\n\n\t/**\n\t * Whether this notification is for a renewal\n\t */\n\tpublic get isRenewal() {\n\t\treturn this[kData].is_renewal;\n\t}\n}\n","import type { APIPoll } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { dateToDiscordISOTimestamp } from '../utils/optimization.js';\nimport { kData, kExpiresTimestamp } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents a poll on a message on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has substructures `PollMedia`, `PollAnswer`, `PollResults` which need to be instantiated and stored by an extending class using it\n */\nexport class Poll<Omitted extends keyof APIPoll | '' = ''> extends Structure<APIPoll, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each Poll.\n\t */\n\tpublic static override DataTemplate: Partial<APIPoll> = {\n\t\tset expiry(_: string) {},\n\t};\n\n\t/**\n\t * Optimized storage of {@link discord-api-types/v10#(APIPoll:interface).expiry}\n\t *\n\t * @internal\n\t */\n\tprotected [kExpiresTimestamp]: number | null = null;\n\n\t/**\n\t * @param data - The raw data received from the API for the poll\n\t */\n\tpublic constructor(data: Partialize<APIPoll, Omitted>) {\n\t\tsuper(data);\n\t\tthis.optimizeData(data);\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.optimizeData}\n\t *\n\t * @internal\n\t */\n\tprotected override optimizeData(data: Partial<APIPoll>) {\n\t\tif (data.expiry) {\n\t\t\tthis[kExpiresTimestamp] = Date.parse(data.expiry);\n\t\t}\n\t}\n\n\t/**\n\t * Whether a user can select multiple answers\n\t */\n\tpublic get allowMultiselect() {\n\t\treturn this[kData].allow_multiselect;\n\t}\n\n\t/**\n\t * The layout type of the poll\n\t */\n\tpublic get layoutType() {\n\t\treturn this[kData].layout_type;\n\t}\n\n\t/**\n\t * The timestamp this poll will expire at\n\t */\n\tpublic get expiresTimestamp() {\n\t\treturn this[kExpiresTimestamp];\n\t}\n\n\t/**\n\t * The time the poll will expire at\n\t */\n\tpublic get expiresAt() {\n\t\tconst expiresTimestamp = this.expiresTimestamp;\n\t\treturn expiresTimestamp ? new Date(expiresTimestamp) : null;\n\t}\n\n\t/**\n\t * {@inheritDoc Structure.toJSON}\n\t */\n\tpublic override toJSON() {\n\t\tconst clone = super.toJSON();\n\t\tif (this[kExpiresTimestamp]) {\n\t\t\tclone.expiry = dateToDiscordISOTimestamp(new Date(this[kExpiresTimestamp]));\n\t\t}\n\n\t\treturn clone;\n\t}\n}\n","import type { APIPollAnswer } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents an answer to a poll on a message on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has a substructure `PollMedia` which need to be instantiated and stored by an extending class using it\n */\nexport class PollAnswer<Omitted extends keyof APIPollAnswer | '' = ''> extends Structure<APIPollAnswer, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each PollAnswer.\n\t */\n\tpublic static override DataTemplate: Partial<APIPollAnswer> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the poll answer\n\t */\n\tpublic constructor(data: Partialize<APIPollAnswer, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the poll answer\n\t */\n\tpublic get answerId() {\n\t\treturn this[kData].answer_id;\n\t}\n}\n","import type { APIPollAnswerCount } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents the counts of answers to a poll on a message on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class PollAnswerCount<Omitted extends keyof APIPollAnswerCount | '' = ''> extends Structure<\n\tAPIPollAnswerCount,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each PollAnswerCount.\n\t */\n\tpublic static override DataTemplate: Partial<APIPollAnswerCount> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the poll answer count\n\t */\n\tpublic constructor(data: Partialize<APIPollAnswerCount, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the poll answer\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The number of votes for this answer\n\t */\n\tpublic get count() {\n\t\treturn this[kData].count;\n\t}\n\n\t/**\n\t * Whether the current user voted for this answer\n\t */\n\tpublic get meVoted() {\n\t\treturn this[kData].me_voted;\n\t}\n}\n","import type { APIPollMedia } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents a field of a poll on a message on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has a substructure `Emoji` which need to be instantiated and stored by an extending class using it\n */\nexport class PollMedia<Omitted extends keyof APIPollMedia | '' = ''> extends Structure<APIPollMedia, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each PollMedia.\n\t */\n\tpublic static override DataTemplate: Partial<APIPollMedia> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the poll media\n\t */\n\tpublic constructor(data: Partialize<APIPollMedia, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The text of the poll field\n\t */\n\tpublic get text() {\n\t\treturn this[kData].text;\n\t}\n}\n","import type { APIPollResults } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents the results of a poll on a message on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has a substructure `PollAnswerCount` which need to be instantiated and stored by an extending class using it\n */\nexport class PollResults<Omitted extends keyof APIPollResults | '' = ''> extends Structure<APIPollResults, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each PollResults.\n\t */\n\tpublic static override DataTemplate: Partial<APIPollResults> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the poll results\n\t */\n\tpublic constructor(data: Partialize<APIPollResults, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * Whether the votes have been precisely counted\n\t */\n\tpublic get isFinalized() {\n\t\treturn this[kData].is_finalized;\n\t}\n}\n","import type { APISticker } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents a sticker on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class Sticker<Omitted extends keyof APISticker | '' = ''> extends Structure<APISticker, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each SitckerItem.\n\t */\n\tpublic static override DataTemplate: Partial<APISticker> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the sticker item\n\t */\n\tpublic constructor(data: Partialize<APISticker, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the sticker\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The name of the sticker\n\t */\n\tpublic get name() {\n\t\treturn this[kData].name;\n\t}\n\n\t/**\n\t * The format type of the sticker\n\t */\n\tpublic get formatType() {\n\t\treturn this[kData].format_type;\n\t}\n\n\t/**\n\t * Whether this guild sticker can be used, may be false due to loss of Server Boosts\n\t */\n\tpublic get available() {\n\t\treturn this[kData].available;\n\t}\n\n\t/**\n\t * The description of the sticker\n\t */\n\tpublic get description() {\n\t\treturn this[kData].description;\n\t}\n\n\t/**\n\t * The autocomplete/suggestion tags for the sticker\n\t */\n\tpublic get tags() {\n\t\treturn this[kData].tags;\n\t}\n\n\t/**\n\t * The type of this sticker\n\t */\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n}\n","import type { APIAvatarDecorationData } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents metadata of an avatar decoration of a User.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class AvatarDecorationData<Omitted extends keyof APIAvatarDecorationData | '' = ''> extends Structure<\n\tAPIAvatarDecorationData,\n\tOmitted\n> {\n\t/**\n\t * The template used for removing data from the raw data stored for each Connection\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIAvatarDecorationData> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIAvatarDecorationData, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the SKU this avatar decoration is part of.\n\t */\n\tpublic get skuId() {\n\t\treturn this[kData].sku_id;\n\t}\n\n\t/**\n\t * The asset of this avatar decoration.\n\t */\n\tpublic get asset() {\n\t\treturn this[kData].asset;\n\t}\n}\n","import { DiscordSnowflake } from '@sapphire/snowflake';\nimport type { APIUser } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport { isIdSet } from '../utils/type-guards.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents any user on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n * @remarks has a substructure `AvatarDecorationData`, which needs to be instantiated and stored by an extending class using it\n */\nexport class User<Omitted extends keyof APIUser | '' = ''> extends Structure<APIUser, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each User\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIUser> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the user\n\t */\n\tpublic constructor(data: Partialize<APIUser, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The user's id\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The username of the user\n\t */\n\tpublic get username() {\n\t\treturn this[kData].username;\n\t}\n\n\t/**\n\t * The user's 4 digit tag, if a bot\n\t */\n\tpublic get discriminator() {\n\t\treturn this[kData].discriminator;\n\t}\n\n\t/**\n\t * The user's display name, the application name for bots\n\t */\n\tpublic get globalName() {\n\t\treturn this[kData].global_name;\n\t}\n\n\t/**\n\t * The name displayed in the client for this user when no nickname is set\n\t */\n\tpublic get displayName() {\n\t\treturn this.globalName ?? this.username;\n\t}\n\n\t/**\n\t * The user avatar's hash\n\t */\n\tpublic get avatar() {\n\t\treturn this[kData].avatar;\n\t}\n\n\t/**\n\t * Whether the user is a bot\n\t */\n\tpublic get bot() {\n\t\treturn this[kData].bot ?? false;\n\t}\n\n\t/**\n\t * Whether the user is an Official Discord System user\n\t */\n\tpublic get system() {\n\t\treturn this[kData].system ?? false;\n\t}\n\n\t/**\n\t * Whether the user has mfa enabled\n\t *\n\t * @remarks This property is only set when the user was fetched with an OAuth2 token and the `identify` scope\n\t */\n\tpublic get mfaEnabled() {\n\t\treturn this[kData].mfa_enabled;\n\t}\n\n\t/**\n\t * The user's banner hash\n\t *\n\t * @remarks This property is only set when the user was manually fetched\n\t */\n\tpublic get banner() {\n\t\treturn this[kData].banner;\n\t}\n\n\t/**\n\t * The base 10 accent color of the user's banner\n\t *\n\t * @remarks This property is only set when the user was manually fetched\n\t */\n\tpublic get accentColor() {\n\t\treturn this[kData].accent_color;\n\t}\n\n\t/**\n\t * The user's primary Discord language\n\t *\n\t * @remarks This property is only set when the user was fetched with an Oauth2 token and the `identify` scope\n\t */\n\tpublic get locale() {\n\t\treturn this[kData].locale;\n\t}\n\n\t/**\n\t * Whether the email on the user's account has been verified\n\t *\n\t * @remarks This property is only set when the user was fetched with an OAuth2 token and the `email` scope\n\t */\n\tpublic get verified() {\n\t\treturn this[kData].verified;\n\t}\n\n\t/**\n\t * The user's email\n\t *\n\t * @remarks This property is only set when the user was fetched with an OAuth2 token and the `email` scope\n\t */\n\tpublic get email() {\n\t\treturn this[kData].email;\n\t}\n\n\t/**\n\t * The type of nitro subscription on the user's account\n\t *\n\t * @remarks This property is only set when the user was fetched with an OAuth2 token and the `identify` scope\n\t */\n\tpublic get premiumType() {\n\t\treturn this[kData].premium_type;\n\t}\n\n\t/**\n\t * The timestamp the user was created at\n\t */\n\tpublic get createdTimestamp() {\n\t\treturn isIdSet(this.id) ? DiscordSnowflake.timestampFrom(this.id) : null;\n\t}\n\n\t/**\n\t * The time the user was created at\n\t */\n\tpublic get createdAt() {\n\t\tconst createdTimestamp = this.createdTimestamp;\n\t\treturn createdTimestamp ? new Date(createdTimestamp) : null;\n\t}\n\n\t/**\n\t * The hexadecimal version of the user accent color, with a leading hash\n\t *\n\t * @remarks This property is only set when the user was manually fetched\n\t */\n\tpublic get hexAccentColor() {\n\t\tconst accentColor = this.accentColor;\n\t\tif (typeof accentColor !== 'number') return accentColor;\n\t\treturn `#${accentColor.toString(16).padStart(6, '0')}`;\n\t}\n}\n","import type { APIConnection } from 'discord-api-types/v10';\nimport { Structure } from '../Structure.js';\nimport { kData } from '../utils/symbols.js';\nimport type { Partialize } from '../utils/types.js';\n\n/**\n * Represents a user's connection on Discord.\n *\n * @typeParam Omitted - Specify the properties that will not be stored in the raw data field as a union, implement via `DataTemplate`\n */\nexport class Connection<Omitted extends keyof APIConnection | '' = ''> extends Structure<APIConnection, Omitted> {\n\t/**\n\t * The template used for removing data from the raw data stored for each Connection\n\t */\n\tpublic static override readonly DataTemplate: Partial<APIConnection> = {};\n\n\t/**\n\t * @param data - The raw data received from the API for the connection\n\t */\n\tpublic constructor(data: Partialize<APIConnection, Omitted>) {\n\t\tsuper(data);\n\t}\n\n\t/**\n\t * The id of the connection account\n\t */\n\tpublic get id() {\n\t\treturn this[kData].id;\n\t}\n\n\t/**\n\t * The username of the connection account\n\t */\n\tpublic get name() {\n\t\treturn this[kData].name;\n\t}\n\n\t/**\n\t * The type of service this connection is for\n\t */\n\tpublic get type() {\n\t\treturn this[kData].type;\n\t}\n\n\t/**\n\t * Whether the connection is revoked\n\t */\n\tpublic get revoked() {\n\t\treturn this[kData].revoked ?? false;\n\t}\n\n\t/**\n\t * Whether the connection is verified\n\t */\n\tpublic get verified() {\n\t\treturn this[kData].verified;\n\t}\n\n\t/**\n\t * Whether friend sync is enabled for this connection\n\t */\n\tpublic get friendSync() {\n\t\treturn this[kData].friend_sync;\n\t}\n\n\t/**\n\t * Whether activities related to this connection are shown in the users presence\n\t */\n\tpublic get showActivity() {\n\t\treturn this[kData].show_activity;\n\t}\n\n\t/**\n\t * Whether this connection has an Oauth2 token for console voice transfer\n\t */\n\tpublic get twoWayLink() {\n\t\treturn this[kData].two_way_link;\n\t}\n\n\t/**\n\t * The visibility state for this connection\n\t */\n\tpublic get visibility() {\n\t\treturn this[kData].visibility;\n\t}\n}\n"],"mappings":";;;;AAsBO,IAAe,WAAf,MAAe,UAA+B;AAAA,EAtBrD,OAsBqD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpD,OAAuB,QAA4C,CAAC;AAAA,EAEpE,OAAuB,aAAqB;AAAA;AAAA;AAAA;AAAA,EAKrC;AAAA;AAAA;AAAA;AAAA,EAOA,YAAY,OAAkC,KAAK,YAAY,YAAY;AACjF,SAAK,WAAW,KAAK,YAAY,QAAQ,IAAI;AAAA,EAC9C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,IAAI,KAAgC;AAC1C,YAAQ,KAAK,WAAW,KAAK,YAAY,QAAQ,GAAG,OAAO,KAAK,YAAY;AAAA,EAC7E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,OAAO,KAAgC;AAC7C,WAAO,KAAK,aAAa,KAAK,YAAY,QAAQ,GAAG;AAAA,EACtD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,IAAI,QAAmC,YAAuB;AACpE,UAAM,cAAc,KAAK,YAAY,QAAQ,GAAG;AAChD,YAAQ,KAAK,WAAW,iBAAiB;AAAA,EAC1C;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