diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 00000000..2789ad23 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +export default Client; +import { default as Client } from "./src/Client.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map new file mode 100644 index 00000000..92fc8f2e --- /dev/null +++ b/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";kCAAkC,iBAAiB"} \ No newline at end of file diff --git a/dist/src/Client.d.ts b/dist/src/Client.d.ts new file mode 100644 index 00000000..58700627 --- /dev/null +++ b/dist/src/Client.d.ts @@ -0,0 +1,274 @@ +export default Client; +/** + * A client user, which is able to handle multiple shards. + * @extends {TypedEmitter<{ + * "ready": (shardGuilds: String[]) => void + * "resumed": () => void + * "guildCreate": (guild: Guild) => void + * "guildDelete": (guild: Guild) => void + * "guildUpdate": (oldGuild: Guild, newGuild: Guild) => void + * "messageCreate": (message: Message) => void + * "messageUpdate": (oldMessage: Message, newMessage: Message) => void + * "messageDelete": (message: Message) => void + * "messageDeleteBulk": (messages: Message[]) => void + * "guildAuditLogEntryCreate": (auditLog: AuditLog) => void + * "guildBanAdd": (bannedUser: User) => void + * "guildBanRemove": (unbannedUser: User) => void + * "guildMemberAdd": (member: Member) => void + * "guildMemberUpdate": (oldMember: Member, newMember: Member) => void + * "guildMemberRemove": (member: Member) => void + * "buttonClick": (interaction: ButtonClick) => void + * "menuSelect": (interaction: OptionSelect) => void + * "modalResponse": (interaction: ModalResponse) => void + * "slashCommand": (interaction: SlashCommand) => void + * "slashCommandAutocomplete": (interaction: SlashCommand) => void + * "voiceStateUpdate": (oldVoiceState: VoiceState, newVoiceState: VoiceState) => void + * "voiceChannelStatusUpdate": (data: Object) => void + * "channelCreate": (channel: TextChannel | VoiceChannel | CategoryChannel) => void + * "channelUpdate": (oldChannel: TextChannel | VoiceChannel | CategoryChannel, newChannel: TextChannel | VoiceChannel | CategoryChannel) => void + * "channelDelete": (channel: TextChannel | VoiceChannel | CategoryChannel) => void + * "channelPinsUpdate": (data: Object) => void + * "threadCreate": (thread: Thread) => void + * "threadUpdate": (oldThread: Thread, newThread: Thread) + * "threadDelete": (thread: Thread) => void + * "threadListSync": (threads: Thread[]) => void + * "inviteCreate": (invite: Invite) => void + * "inviteDelete": (data: Object, invite: Invite) => void + * "roleCreate": (role: Role) => void + * "roleUpdate": (oldRole: Role, newRole: Role) => void + * "roleDelete": (role: Role) => void + * "emojiCreate": (emoji: Emoji) => void + * "emojiUpdate": (oldEmoji: Emoji, newEmoji: Emoji) => void + * "emojiDelete": (emoji: Emoji) => void + * "entitlementCreate": (entitlement: Object) => void + * "entitlementUpdate": (entitlement: Object) => void + * "entitlementDelete": (entitlement: Object) => void + * "guildScheduledEventCreate": (scheduledEvent: ScheduledEvent) => void + * "guildScheduledEventUpdate": (oldScheduledEvent: ScheduledEvent, newScheduledEvent: ScheduledEvent) => void + * "guildScheduledEventDelete": (scheduledEvent: ScheduledEvent) => void + * "guildScheduledEventUserAdd": (data: Object, user: User) => void + * "guildScheduledEventUserRemove": (data: Object, user: User) => void + * "initialised": () => void + * "messagePollVoteAdd": (data: Object) => void + * "messagePollVoteRemove": (data: Object) => void + * "messageReactionAdd": (data: Object) => void + * "messageReactionRemove": (data: Object) => void + * "webhooksUpdate": (data: Object) => void + * }>} + */ +declare class Client extends TypedEmitter<{ + ready: (shardGuilds: string[]) => void; + resumed: () => void; + guildCreate: (guild: Guild) => void; + guildDelete: (guild: Guild) => void; + guildUpdate: (oldGuild: Guild, newGuild: Guild) => void; + messageCreate: (message: Message) => void; + messageUpdate: (oldMessage: Message, newMessage: Message) => void; + messageDelete: (message: Message) => void; + messageDeleteBulk: (messages: Message[]) => void; + guildAuditLogEntryCreate: (auditLog: AuditLog) => void; + guildBanAdd: (bannedUser: User) => void; + guildBanRemove: (unbannedUser: User) => void; + guildMemberAdd: (member: Member) => void; + guildMemberUpdate: (oldMember: Member, newMember: Member) => void; + guildMemberRemove: (member: Member) => void; + buttonClick: (interaction: ButtonClick) => void; + menuSelect: (interaction: OptionSelect) => void; + modalResponse: (interaction: ModalResponse) => void; + slashCommand: (interaction: SlashCommand) => void; + slashCommandAutocomplete: (interaction: SlashCommand) => void; + voiceStateUpdate: (oldVoiceState: VoiceState, newVoiceState: VoiceState) => void; + voiceChannelStatusUpdate: (data: any) => void; + channelCreate: (channel: TextChannel | VoiceChannel | CategoryChannel) => void; + channelUpdate: (oldChannel: TextChannel | VoiceChannel | CategoryChannel, newChannel: TextChannel | VoiceChannel | CategoryChannel) => void; + channelDelete: (channel: TextChannel | VoiceChannel | CategoryChannel) => void; + channelPinsUpdate: (data: any) => void; + threadCreate: (thread: Thread) => void; + threadUpdate: (oldThread: Thread, newThread: Thread) => "threadDelete"; +}> { + /** + * Creates the client and sets the default options. + * @constructor + * @param {Object?} options The options to pass to the client. + * @param {Boolean?} options.cacheMessages Whether to cache messages. + * @param {Boolean?} options.cacheUsers Whether to cache users. + * @param {Boolean?} options.cacheMembers Whether to cache members. + * @param {Boolean?} options.cacheChannels Whether to cache channels. + * @param {Boolean?} options.cacheGuilds Whether to cache guilds. + * @param {Boolean?} options.cacheVoiceStates Whether to cache voice states. + * @param {Boolean?} options.cacheRoles Whether to cache roles. + * @param {Boolean?} options.cacheScheduledEvents Whether to cache scheduled events. + * @param {Boolean?} options.cacheEmojis Whether to cache emojis. + * @param {Boolean?} options.cacheInvites Whether to cache invites. + * @param {Number?} options.defaultMessageExpiry The default expiry time for messages. + * @param {Number?} options.defaultUserExpiry The default expiry time for users. + * @param {Number} options.intents The intents to use when connecting. + * @param {Number?} options.totalShards The total number of shards to manage. + * @param {Array?} options.shardIds The ids of the shards to manage. + * @param {Object?} options.sessionData The session data for the client. + * @param {Object?} options.initCache The initial cache data for the client. + * @param {Function?} options.softRestartFunction The function to call when a soft restart is needed. + * @throws {TypeError} + * @public + * @method + */ + constructor({ cacheMessages, cacheUsers, cacheMembers, cacheChannels, cacheGuilds, cacheVoiceStates, cacheRoles, cacheScheduledEvents, cacheEmojis, cacheInvites, defaultMessageExpiry, defaultUserExpiry, intents, totalShards, shardIds, sessionData, initCache, softRestartFunction, }?: any | null); + /** + * The client user. + * @type {User?} + */ + user: User | null; + /** + * The ids of the shards that this client is managing. + * @type {Array} + * @readonly + * @public + */ + public readonly get shardIds(): number[]; + /** + * The total number of shards that this client is managing. + * @type {Number} + * @readonly + * @public + */ + public readonly get totalShards(): number; + /** + * The intents that this client is using. + * @type {Number} + * @readonly + * @public + */ + public readonly get intents(): number; + /** + * The user manager for this client. + * @type {UserManager} + * @readonly + * @public + */ + public readonly get users(): UserManager; + /** + * The guild manager for this client. + * @type {GuildManager} + * @readonly + * @public + */ + public readonly get guilds(): GuildManager; + /** + * The function to call when a soft restart is needed. + * @public + * @method + * @returns {void} + */ + public softRestartFunction(): void; + /** + * Stops all shards. + * @public + * @method + * @returns {void} + */ + public halt(): void; + /** + * Monitors the current process. + * @public + * @method + * @returns {Object} + */ + public checkProcess(): any; + /** + * Outputs a debug message if NODE_ENV=development. + * @param {Number} status The debug status level. + * @param {String} message The message to emit. + * @returns {void} + * @method + * @public + */ + public _emitDebug(status: number, message: string): void; + /** + * Counts how many items are in each cache. + * @returns {Object} + * @public + * @method + */ + public getCacheCounts(): any; + /** + * Returns the cache options for this client. + * @type {GluonCacheOptions} + * @readonly + * @public + */ + public readonly get _cacheOptions(): GluonCacheOptions; + /** + * Returns the global guild cache options for this client. + * @type {GuildCacheOptions} + * @readonly + * @public + */ + public readonly get _defaultGuildCacheOptions(): GuildCacheOptions; + /** + * Counts how many members are in all of Quark's servers. + * @returns {Number} + * @public + * @method + */ + public getMemberCount(): number; + /** + * Bundles all guilds. + * @returns {Array} + * @public + * @method + */ + public bundleCache(): Array; + /** + * Registers commands, overwriting all previous ones. + * @param {Array} commands Array of commands to register. + * @returns {Array} + * @see {@link https://discord.com/developers/docs/interactions/application-commands#registering-a-command} + * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands} + * @public + * @method + * @async + * @throws {TypeError} + */ + public registerCommands(commands: Array): Array; + /** + * Sets the bot's status across all shards. + * @param {Object} status Status options. + * @param {String} status.name The bot's new status. + * @param {Number} status.type The type of status. + * @param {String} status.status The bot's status. + * @param {Boolean} status.afk Whether the bot is afk. + * @param {Number} status.since The time since the bot has been afk. + * @returns {void} + * @public + * @method + * @throws {TypeError} + */ + public setStatus({ name, type, status, afk, since }?: { + name: string; + type: number; + status: string; + afk: boolean; + since: number; + }): void; + /** + * Initiates the login sequence + * @param {String} token The authorization token + * @returns {void} + * @public + * @method + * @throws {TypeError} + */ + public login(token: string): void; + request: BetterRequestHandler; + #private; +} +import Guild from "./structures/Guild.js"; +import User from "./structures/User.js"; +import { TypedEmitter } from "tiny-typed-emitter"; +import UserManager from "./managers/UserManager.js"; +import GuildManager from "./managers/GuildManager.js"; +import GluonCacheOptions from "./managers/GluonCacheOptions.js"; +import GuildCacheOptions from "./managers/GuildCacheOptions.js"; +import Command from "./util/builder/commandBuilder.js"; +import BetterRequestHandler from "./rest/betterRequestHandler.js"; +//# sourceMappingURL=Client.d.ts.map \ No newline at end of file diff --git a/dist/src/Client.d.ts.map b/dist/src/Client.d.ts.map new file mode 100644 index 00000000..34ed4a51 --- /dev/null +++ b/dist/src/Client.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../src/Client.js"],"names":[],"mappings":";AA+BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH;WAtDa,CAAC,WAAW,EAAE,QAAQ,KAAK,IAAI;aAC7B,MAAM,IAAI;iBACN,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;iBACtB,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;iBACtB,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,KAAK,IAAI;mBACxC,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI;mBAC1B,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI;mBAClD,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI;uBACtB,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,IAAI;8BACtB,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI;iBACzC,CAAC,UAAU,EAAE,IAAI,KAAK,IAAI;oBACvB,CAAC,YAAY,EAAE,IAAI,KAAK,IAAI;oBAC5B,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;uBACrB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI;uBAC9C,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;iBAC9B,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI;gBACnC,CAAC,WAAW,EAAE,YAAY,KAAK,IAAI;mBAChC,CAAC,WAAW,EAAE,aAAa,KAAK,IAAI;kBACrC,CAAC,WAAW,EAAE,YAAY,KAAK,IAAI;8BACvB,CAAC,WAAW,EAAE,YAAY,KAAK,IAAI;sBAC3C,CAAC,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,KAAK,IAAI;8BACtD,CAAC,IAAI,KAAQ,KAAK,IAAI;mBACjC,CAAC,OAAO,EAAE,WAAW,GAAG,YAAY,GAAG,eAAe,KAAK,IAAI;mBAC/D,CAAC,UAAU,EAAE,WAAW,GAAG,YAAY,GAAG,eAAe,EAAE,UAAU,EAAE,WAAW,GAAG,YAAY,GAAG,eAAe,KAAK,IAAI;mBAC5H,CAAC,OAAO,EAAE,WAAW,GAAG,YAAY,GAAG,eAAe,KAAK,IAAI;uBAC3D,CAAC,IAAI,KAAQ,KAAK,IAAI;kBAC3B,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;kBACxB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KACxD,cAAiB;;IAsChB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,4RAvBW,UAAO,EAyIjB;IAzBC;;;OAGG;IACH,MAFU,IAAI,OAAC,CAEC;IAuBlB;;;;;OAKG;IACH,yCAEC;IAED;;;;;OAKG;IACH,0CAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,yCAEC;IAED;;;;;OAKG;IACH,2CAEC;IAED;;;;;OAKG;IACH,8BAFa,IAAI,CAIhB;IAED;;;;;OAKG;IACH,eAFa,IAAI,CAIhB;IAED;;;;;OAKG;IACH,2BAoBC;IAED;;;;;;;OAOG;IACH,oDAJa,IAAI,CAmChB;IAED;;;;;OAKG;IACH,6BAsCC;IAED;;;;;OAKG;IACH,uDAEC;IAED;;;;;OAKG;IACH,mEAEC;IAED;;;;;OAKG;IACH,gCAQC;IAED;;;;;OAKG;IACH,sBAJa,KAAK,KAAQ,CAMzB;IAED;;;;;;;;;;OAUG;IACH,kCATW,KAAK,CAAC,OAAO,CAAC,GACZ,KAAK,KAAQ,CAwBzB;IAED;;;;;;;;;;;;OAYG;IACH,sDAVG;QAAuB,IAAI;QACJ,IAAI;QACJ,MAAM;QACL,GAAG;QACJ,KAAK;KAC5B,GAAU,IAAI,CAkBhB;IAED;;;;;;;OAOG;IACH,6BALa,IAAI,CA+EhB;IApEC,8BAA0D;;CAqE7D;kBA7kBiB,uBAAuB;iBACxB,sBAAsB;6BAZV,oBAAoB;wBASzB,2BAA2B;yBAC1B,4BAA4B;8BAIvB,iCAAiC;8BACjC,iCAAiC;oBAC3C,kCAAkC;iCAdrB,gCAAgC"} \ No newline at end of file diff --git a/dist/src/compiledStructures.d.ts b/dist/src/compiledStructures.d.ts new file mode 100644 index 00000000..d1ef3d6a --- /dev/null +++ b/dist/src/compiledStructures.d.ts @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=compiledStructures.d.ts.map \ No newline at end of file diff --git a/dist/src/compiledStructures.d.ts.map b/dist/src/compiledStructures.d.ts.map new file mode 100644 index 00000000..281335c9 --- /dev/null +++ b/dist/src/compiledStructures.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"compiledStructures.d.ts","sourceRoot":"","sources":["../../src/compiledStructures.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/src/constants.d.ts b/dist/src/constants.d.ts new file mode 100644 index 00000000..b2cc218b --- /dev/null +++ b/dist/src/constants.d.ts @@ -0,0 +1,476 @@ +export const BASE_URL: "https://discord.com"; +export const API_BASE_URL: "https://discord.com/api"; +export const CDN_BASE_URL: "https://cdn.discordapp.com"; +export const INVITE_BASE_URL: "https://discord.gg"; +export const VERSION: 10; +export const NAME: any; +export const GLUON_REPOSITORY_URL: any; +export namespace INTENTS { + let GUILDS: number; + let GUILD_MEMBERS: number; + let GUILD_BANS: number; + let GUILD_EMOJIS: number; + let GUILD_INTEGRATIONS: number; + let GUILD_WEBHOOKS: number; + let GUILD_INVITES: number; + let GUILD_VOICE_STATES: number; + let GUILD_PRESENCES: number; + let GUILD_MESSAGES: number; + let GUILD_MESSAGE_REACTIONS: number; + let GUILD_MESSAGE_TYPING: number; + let DIRECT_MESSAGES: number; + let DIRECT_MESSAGE_REACTIONS: number; + let DIRECT_MESSAGE_TYPING: number; + let MESSAGE_CONTENT: number; + let GUILD_SCHEDULED_EVENTS: number; + let AUTO_MODERATION_CONFIGURATION: number; + let AUTO_MODERATION_EXECUTION: number; + let GUILD_MESSAGE_POLLS: number; + let DIRECT_MESSAGE_POLLS: number; +} +export namespace EVENTS { + let READY: string; + let RESUMED: string; + let GUILD_CREATE: string; + let GUILD_DELETE: string; + let GUILD_UPDATE: string; + let MESSAGE_CREATE: string; + let MESSAGE_UPDATE: string; + let MESSAGE_DELETE: string; + let MESSAGE_DELETE_BULK: string; + let GUILD_AUDIT_LOG_ENTRY_CREATE: string; + let GUILD_BAN_ADD: string; + let GUILD_BAN_REMOVE: string; + let GUILD_MEMBER_ADD: string; + let GUILD_MEMBER_UPDATE: string; + let GUILD_MEMBER_REMOVE: string; + let BUTTON_CLICK: string; + let MENU_SELECT: string; + let MODAL_RESPONSE: string; + let SLASH_COMMAND: string; + let SLASH_COMMAND_AUTOCOMPLETE: string; + let VOICE_STATE_UPDATE: string; + let VOICE_CHANNEL_STATUS_UPDATE: string; + let CHANNEL_CREATE: string; + let CHANNEL_UPDATE: string; + let CHANNEL_DELETE: string; + let CHANNEL_PINS_UPDATE: string; + let THREAD_CREATE: string; + let THREAD_UPDATE: string; + let THREAD_DELETE: string; + let THREAD_LIST_SYNC: string; + let INVITE_CREATE: string; + let INVITE_DELETE: string; + let GUILD_ROLE_CREATE: string; + let GUILD_ROLE_UPDATE: string; + let GUILD_ROLE_DELETE: string; + let GUILD_EMOJI_CREATE: string; + let GUILD_EMOJI_UPDATE: string; + let GUILD_EMOJI_DELETE: string; + let ENTITLEMENT_CREATE: string; + let ENTITLEMENT_UPDATE: string; + let ENTITLEMENT_DELETE: string; + let GUILD_SCHEDULED_EVENT_CREATE: string; + let GUILD_SCHEDULED_EVENT_UPDATE: string; + let GUILD_SCHEDULED_EVENT_DELETE: string; + let GUILD_SCHEDULED_EVENT_USER_ADD: string; + let GUILD_SCHEDULED_EVENT_USER_REMOVE: string; + let INITIALISED: string; + let MESSAGE_POLL_VOTE_ADD: string; + let MESSAGE_POLL_VOTE_REMOVE: string; + let MESSAGE_REACTION_ADD: string; + let MESSAGE_REACTION_REMOVE: string; + let WEBHOOKS_UPDATE: string; +} +export namespace CHANNEL_TYPES { + let GUILD_TEXT: number; + let GUILD_VOICE: number; + let GUILD_CATEGORY: number; + let GUILD_NEWS: number; + let GUILD_NEWS_THREAD: number; + let GUILD_PUBLIC_THREAD: number; + let GUILD_PRIVATE_THREAD: number; + let GUILD_STAGE_VOICE: number; + let GUILD_DIRECTORY: number; + let GUILD_FORUM: number; + let GUILD_MEDIA: number; +} +export namespace USER_FLAGS { + let DISCORD_EMPLOYEE: number; + let DISCORD_PARTNER: number; + let HYPESQUAD_EVENTS: number; + let BUG_HUNTER_LEVEL_1: number; + let HOUSE_BRAVERY: number; + let HOUSE_BRILLIANCE: number; + let HOUSE_BALANCE: number; + let EARLY_SUPPORTER: number; + let TEAM_USER: number; + let SYSTEM: number; + let BUG_HUNTER_LEVEL_2: number; + let VERIFIED_BOT: number; + let VERIFIED_BOT_DEVELOPER: number; +} +export namespace MEMBER_FLAGS { + let DID_REJOIN: number; + let COMPLETED_ONBOARDING: number; + let BYPASSES_VERIFICATION: number; + let STARTED_ONBOARDING: number; +} +export namespace MESSAGE_FLAGS { + let CROSSPOSTED: number; + let IS_CROSSPOST: number; + let SUPPRESS_EMBEDS: number; + let SOURCE_MESSAGE_DELETED: number; + let URGENT: number; + let HAS_THREAD: number; + let EPHEMERAL: number; + let LOADING: number; + let FAILED_TO_MENTION_SOME_ROLES_IN_THREAD: number; + let SUPPRESS_NOTIFICATIONS: number; + let IS_VOICE_MESSAGE: number; +} +export namespace AUDIT_LOG_TYPES { + let GUILD_UPDATE_1: number; + export { GUILD_UPDATE_1 as GUILD_UPDATE }; + let CHANNEL_CREATE_1: number; + export { CHANNEL_CREATE_1 as CHANNEL_CREATE }; + let CHANNEL_UPDATE_1: number; + export { CHANNEL_UPDATE_1 as CHANNEL_UPDATE }; + let CHANNEL_DELETE_1: number; + export { CHANNEL_DELETE_1 as CHANNEL_DELETE }; + export let CHANNEL_OVERWRITE_CREATE: number; + export let CHANNEL_OVERWRITE_UPDATE: number; + export let CHANNEL_OVERWRITE_DELETE: number; + export let MEMBER_KICK: number; + export let MEMBER_PRUNE: number; + export let MEMBER_BAN_ADD: number; + export let MEMBER_BAN_REMOVE: number; + export let MEMBER_UPDATE: number; + export let MEMBER_ROLE_UPDATE: number; + export let MEMBER_MOVE: number; + export let MEMBER_DISCONNECT: number; + export let BOT_ADD: number; + export let ROLE_CREATE: number; + export let ROLE_UPDATE: number; + export let ROLE_DELETE: number; + let INVITE_CREATE_1: number; + export { INVITE_CREATE_1 as INVITE_CREATE }; + export let INVITE_UPDATE: number; + let INVITE_DELETE_1: number; + export { INVITE_DELETE_1 as INVITE_DELETE }; + export let WEBHOOK_CREATE: number; + export let WEBHOOK_UPDATE: number; + export let WEBHOOK_DELETE: number; + export let EMOJI_CREATE: number; + export let EMOJI_UPDATE: number; + export let EMOJI_DELETE: number; + let MESSAGE_DELETE_1: number; + export { MESSAGE_DELETE_1 as MESSAGE_DELETE }; + export let MESSAGE_BULK_DELETE: number; + export let MESSAGE_PIN: number; + export let MESSAGE_UNPIN: number; + export let INTEGRATION_CREATE: number; + export let INTEGRATION_UPDATE: number; + export let INTEGRATION_DELETE: number; + export let STAGE_INSTANCE_CREATE: number; + export let STAGE_INSTANCE_UPDATE: number; + export let STAGE_INSTANCE_DELETE: number; + export let STICKER_CREATE: number; + export let STICKER_UPDATE: number; + export let STICKER_DELETE: number; + let GUILD_SCHEDULED_EVENT_CREATE_1: number; + export { GUILD_SCHEDULED_EVENT_CREATE_1 as GUILD_SCHEDULED_EVENT_CREATE }; + let GUILD_SCHEDULED_EVENT_UPDATE_1: number; + export { GUILD_SCHEDULED_EVENT_UPDATE_1 as GUILD_SCHEDULED_EVENT_UPDATE }; + let GUILD_SCHEDULED_EVENT_DELETE_1: number; + export { GUILD_SCHEDULED_EVENT_DELETE_1 as GUILD_SCHEDULED_EVENT_DELETE }; + let THREAD_CREATE_1: number; + export { THREAD_CREATE_1 as THREAD_CREATE }; + let THREAD_UPDATE_1: number; + export { THREAD_UPDATE_1 as THREAD_UPDATE }; + let THREAD_DELETE_1: number; + export { THREAD_DELETE_1 as THREAD_DELETE }; + export let APPLICATION_COMMAND_PERMISSION_UPDATE: number; + export let AUTO_MODERATION_RULE_CREATE: number; + export let AUTO_MODERATION_RULE_UPDATE: number; + export let AUTO_MODERATION_RULE_DELETE: number; + export let AUTO_MODERATION_BLOCK_MESSAGE: number; + export let AUTO_MODERATION_FLAG_TO_CHANNEL: number; + export let AUTO_MODERATION_USER_COMMUNICATION_DISABLED: number; + export let CREATOR_MONETIZATION_REQUEST_CREATED: number; + export let CREATOR_MONETIZATION_TERMS_ACCEPTED: number; + let VOICE_CHANNEL_STATUS_UPDATE_1: number; + export { VOICE_CHANNEL_STATUS_UPDATE_1 as VOICE_CHANNEL_STATUS_UPDATE }; +} +export namespace INTERACTION_TYPES { + let COMMAND: number; + let COMPONENT: number; + let APPLICATION_COMMAND_AUTOCOMPLETE: number; + let MODAL_SUBMIT: number; +} +export namespace COMPONENT_TYPES { + let ACTION_ROW: number; + let BUTTON: number; + let SELECT_MENU: number; + let TEXT_INPUT: number; + let USER_SELECT_MENU: number; + let ROLE_SELECT_MENU: number; + let MENTIONABLE_SELECT_MENU: number; + let CHANNEL_SELECT_MENU: number; +} +export namespace SELECT_MENU_TYPES { + let TEXT: number; + let USER: number; + let ROLE: number; + let MENTIONABLE: number; + let CHANNEL: number; +} +export namespace BUTTON_STYLES { + let PRIMARY: number; + let SECONDARY: number; + let SUCCESS: number; + let DANGER: number; + let LINK: number; +} +export namespace TEXT_INPUT_STYLES { + let SHORT: number; + let PARAGRAPH: number; +} +export namespace APPLICATION_COMMAND_TYPES { + export let CHAT_INPUT: number; + let USER_1: number; + export { USER_1 as USER }; + export let MESSAGE: number; +} +export namespace APPLICATION_COMMAND_OPTION_TYPES { + export let SUB_COMMAND: number; + export let SUB_COMMAND_GROUP: number; + export let STRING: number; + export let INTEGER: number; + export let BOOLEAN: number; + let USER_2: number; + export { USER_2 as USER }; + let CHANNEL_1: number; + export { CHANNEL_1 as CHANNEL }; + let ROLE_1: number; + export { ROLE_1 as ROLE }; + let MENTIONABLE_1: number; + export { MENTIONABLE_1 as MENTIONABLE }; + export let NUMBER: number; + export let ATTACHMENT: number; +} +export const DEFAULT_MESSAGE_EXPIRY_SECONDS: number; +export const DEFAULT_USER_EXPIRY_SECONDS: number; +export const DEFAULT_POLLING_TIME: number; +export const DEFAULT_INCREASE_CACHE_BY: 28; +export namespace PERMISSIONS { + let CREATE_INSTANT_INVITE: string; + let KICK_MEMBERS: string; + let BAN_MEMBERS: string; + let ADMINISTRATOR: string; + let MANAGE_CHANNELS: string; + let MANAGE_GUILD: string; + let ADD_REACTIONS: string; + let VIEW_AUDIT_LOG: string; + let PRIORITY_SPEAKER: string; + let STREAM: string; + let VIEW_CHANNEL: string; + let SEND_MESSAGES: string; + let SEND_TTS_MESSAGES: string; + let MANAGE_MESSAGES: string; + let EMBED_LINKS: string; + let ATTACH_FILES: string; + let READ_MESSAGE_HISTORY: string; + let MENTION_EVERYONE: string; + let USE_EXTERNAL_EMOJIS: string; + let VIEW_GUILD_INSIGHTS: string; + let CONNECT: string; + let SPEAK: string; + let MUTE_MEMBERS: string; + let DEAFEN_MEMBERS: string; + let MOVE_MEMBERS: string; + let USE_VAD: string; + let CHANGE_NICKNAME: string; + let MANAGE_NICKNAMES: string; + let MANAGE_ROLES: string; + let MANAGE_WEBHOOKS: string; + let MANAGE_EMOJIS: string; + let USE_SLASH_COMMANDS: string; + let REQUEST_TO_SPEAK: string; + let MANAGE_THREADS: string; + let USE_PUBLIC_THREADS: string; + let USE_PRIVATE_THREADS: string; + let USE_EXTERNAL_STICKERS: string; + let SEND_MESSAGES_IN_THREADS: string; + let USE_EMBEDDED_ACTIVITIES: string; + let MODERATE_MEMBERS: string; + let VIEW_CREATOR_MONETIZATION_ANALYTICS: string; + let USE_SOUNDBOARD: string; + let CREATE_GUILD_EXPRESSIONS: string; + let CREATE_EVENTS: string; + let USE_EXTERNAL_SOUNDS: string; + let SEND_VOICE_MESSAGES: string; + let SEND_POLLS: string; +} +export const STICKER_FORMATS: string[]; +export namespace STICKER_FORMATS_ENUM { + let PNG: number; + let APNG: number; + let LOTTIE: number; +} +export namespace WEBSOCKET_STATES { + let CONNECTING: number; + let OPEN: number; + let CLOSING: number; + let CLOSED: number; +} +export namespace GLUON_GLOBAL_CACHE_ENUM { + let GUILDS_1: number; + export { GUILDS_1 as GUILDS }; + export let USERS: number; + export let CHANNELS: number; + export let MESSAGES: number; + export let ROLES: number; + export let EMOJIS: number; + export let INVITES: number; + export let VOICE_STATES: number; + export let MEMBERS: number; + export let SCHEDULED_EVENTS: number; +} +export namespace GLUON_CACHING_OPTIONS { + let NO_MESSAGES: number; + let FILES_ONLY: number; + let NO_VOICE_STATE: number; +} +export namespace GLUON_GUILD_CACHING_OPTIONS { + let MESSAGES_1: number; + export { MESSAGES_1 as MESSAGES }; + export let FILES: number; + let VOICE_STATES_1: number; + export { VOICE_STATES_1 as VOICE_STATES }; + let ROLES_1: number; + export { ROLES_1 as ROLES }; + let EMOJIS_1: number; + export { EMOJIS_1 as EMOJIS }; + let INVITES_1: number; + export { INVITES_1 as INVITES }; + let CHANNELS_1: number; + export { CHANNELS_1 as CHANNELS }; + let MEMBERS_1: number; + export { MEMBERS_1 as MEMBERS }; + export let THREADS: number; + let SCHEDULED_EVENTS_1: number; + export { SCHEDULED_EVENTS_1 as SCHEDULED_EVENTS }; +} +export namespace GLUON_CHANNEL_CACHING_OPTIONS { + let MESSAGES_2: number; + export { MESSAGES_2 as MESSAGES }; + let FILES_1: number; + export { FILES_1 as FILES }; + export let CONTENT: number; + export let POLL: number; + export let REACTIONS: number; + export let EMBEDS: number; + export let ATTRIBUTES: number; + export let REFERENCE: number; + export let WEBHOOK: number; + export let STICKER: number; +} +export namespace PERMISSION_OVERWRITE_TYPES { + let ROLE_2: number; + export { ROLE_2 as ROLE }; + export let MEMBER: number; +} +export namespace GLUON_DEBUG_LEVELS { + export let NONE: number; + export let ERROR: number; + export let WARN: number; + let DANGER_1: number; + export { DANGER_1 as DANGER }; + export let INFO: number; +} +export namespace AUTO_MODERATION_TRIGGER_TYPES { + let KEYWORD: number; + let SPAM: number; + let KEYWORD_PRESET: number; + let MENTION_SPAM: number; +} +export namespace AUTO_MODERATION_EVENT_TYPES { + let MESSAGE_SEND: number; +} +export namespace AUTO_MODERATION_KEYWORD_PRESET_TYPES { + let PROFANITY: number; + let SEXUAL_CONTENT: number; + let SLURS: number; +} +export namespace AUTO_MODERATION_ACTION_TYPES { + let BLOCK_MESSAGE: number; + let SEND_ALERT_MESSAGE: number; + let TIMEOUT: number; +} +export const GATEWAY_RECONNECT_CLOSE_CODES: number[]; +export namespace LIMITS { + let MAX_ACTION_ROW_BUTTONS: number; + let MAX_EMBED_SIZE: number; + let MAX_EMBED_DESCRIPTION: number; + let MAX_EMBED_TITLE: number; + let MAX_EMBED_FIELDS: number; + let MAX_EMBED_FIELD_NAME: number; + let MAX_EMBED_FIELD_VALUE: number; + let MAX_EMBED_FOOTER_TEXT: number; + let MAX_EMBED_AUTHOR_NAME: number; + let MAX_COMMAND_NAME: number; + let MIN_COMMAND_NAME: number; + let MAX_COMMAND_DESCRIPTION: number; + let MIN_COMMAND_DESCRIPTION: number; + let MAX_COMMAND_OPTIONS: number; + let MAX_COMMAND_OPTION_NAME: number; + let MIN_COMMAND_OPTION_NAME: number; + let MAX_COMMAND_OPTION_DESCRIPTION: number; + let MIN_COMMAND_OPTION_DESCRIPTION: number; + let MAX_COMMAND_OPTION_CHOICES: number; + let MAX_COMMAND_OPTION_CHOICE_NAME: number; + let MIN_COMMAND_OPTION_CHOICE_NAME: number; + let MAX_COMMAND_OPTION_CHOICE_VALUE: number; + let MIN_COMMAND_OPTION_CHOICE_VALUE: number; + let MAX_BUTTON_LABEL: number; + let MAX_BUTTON_CUSTOM_ID: number; + let MAX_DROPDOWN_CUSTOM_ID: number; + let MAX_DROPDOWN_OPTIONS: number; + let MAX_DROPDOWN_PLACEHOLDER: number; + let MIN_MIN_DROPDOWN_VALUES: number; + let MAX_MIN_DROPDOWN_VALUES: number; + let MIN_MAX_DROPDOWN_VALUES: number; + let MAX_MAX_DROPDOWN_VALUES: number; + let MAX_ACTION_ROWS: number; + let MAX_TEXT_INPUT_LABEL: number; + let MAX_TEXT_INPUT_CUSTOM_ID: number; + let MAX_TEXT_INPUT_PLACEHOLDER: number; + let MAX_TEXT_INPUT_VALUE: number; + let MAX_DROPDOWN_OPTION_LABEL: number; + let MAX_DROPDOWN_OPTION_VALUE: number; + let MAX_DROPDOWN_OPTION_DESCRIPTION: number; + let MIN_MIN_TEXT_INPUT_LENGTH: number; + let MAX_MIN_TEXT_INPUT_LENGTH: number; + let MIN_MAX_TEXT_INPUT_LENGTH: number; + let MAX_MAX_TEXT_INPUT_LENGTH: number; + let MAX_FILE_NAME_LENGTH: number; + let MIN_MIN_COMMAND_OPTION_LENGTH: number; + let MAX_MIN_COMMAND_OPTION_LENGTH: number; + let MIN_MAX_COMMAND_OPTION_LENGTH: number; + let MAX_MAX_COMMAND_OPTION_LENGTH: number; + let MAX_MESSAGE_CONTENT: number; + let MAX_NITRO_MESSAGE_CONTENT: number; + let MAX_MESSAGE_EMBEDS: number; + let MAX_MESSAGE_FILES: number; + let MIN_MESSAGES_FETCH_LIMIT: number; + let MAX_MESSAGES_FETCH_LIMIT: number; +} +export const COMMAND_NAME_REGEX: RegExp; +export namespace TO_JSON_TYPES_ENUM { + let DISCORD_FORMAT: number; + let CACHE_FORMAT: number; + let STORAGE_FORMAT: number; +} +export const GLUON_VERSION: any; +//# sourceMappingURL=constants.d.ts.map \ No newline at end of file diff --git a/dist/src/constants.d.ts.map b/dist/src/constants.d.ts.map new file mode 100644 index 00000000..fbe42b67 --- /dev/null +++ b/dist/src/constants.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.js"],"names":[],"mappings":"AACA,6CAA8C;AAC9C,qDAAsD;AACtD,wDAAyD;AACzD,mDAAoD;AACpD,yBAA0B;AAC1B,uBAAqC;AACrC,uCAAwE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4OxE,oDAAwD;AACxD,iDAAoD;AACpD,0CAA8C;AAC9C,2CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkD5C,uCAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmF/D,qDAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DF,wCACkD;;;;;;AAMlD,gCAAiD"} \ No newline at end of file diff --git a/dist/src/gateway/eventHandler.d.ts b/dist/src/gateway/eventHandler.d.ts new file mode 100644 index 00000000..9a1439ed --- /dev/null +++ b/dist/src/gateway/eventHandler.d.ts @@ -0,0 +1,56 @@ +export default EventHandler; +declare class EventHandler { + constructor(client: any, ws: any); + READY(data: any): void; + RESUMED(data: any): void; + GUILD_CREATE(data: any): void; + GUILD_UPDATE(data: any): void; + GUILD_DELETE(data: any): void; + GUILD_ROLE_CREATE(data: any): void; + GUILD_ROLE_UPDATE(data: any): void; + GUILD_ROLE_DELETE(data: any): void; + CHANNEL_CREATE(data: any): void; + CHANNEL_UPDATE(data: any): void; + CHANNEL_DELETE(data: any): void; + CHANNEL_PINS_UPDATE(data: any): void; + THREAD_CREATE(data: any): void; + THREAD_UPDATE(data: any): void; + THREAD_DELETE(data: any): void; + THREAD_LIST_SYNC(data: any): void; + GUILD_MEMBER_ADD(data: any): void; + GUILD_MEMBER_REMOVE(data: any): void; + GUILD_MEMBER_UPDATE(data: any): void; + GUILD_MEMBERS_CHUNK(data: any): void; + GUILD_BAN_ADD(data: any): void; + GUILD_BAN_REMOVE(data: any): void; + INVITE_CREATE(data: any): void; + INVITE_DELETE(data: any): void; + VOICE_STATE_UPDATE(data: any): void; + VOICE_CHANNEL_STATUS_UPDATE(data: any): void; + MESSAGE_CREATE(data: any): void; + MESSAGE_UPDATE(data: any): void; + MESSAGE_DELETE(data: any): void; + MESSAGE_DELETE_BULK(data: any): void; + INTERACTION_CREATE(data: any): void; + GUILD_AUDIT_LOG_ENTRY_CREATE(data: any): void; + ENTITLEMENT_CREATE(data: any): void; + ENTITLEMENT_UPDATE(data: any): void; + ENTITLEMENT_DELETE(data: any): void; + GUILD_SCHEDULED_EVENT_CREATE(data: any): void; + GUILD_SCHEDULED_EVENT_UPDATE(data: any): void; + GUILD_SCHEDULED_EVENT_DELETE(data: any): void; + GUILD_SCHEDULED_EVENT_USER_ADD(data: any): void; + GUILD_SCHEDULED_EVENT_USER_REMOVE(data: any): void; + AUTO_MODERATION_RULE_CREATE(data: any): void; + AUTO_MODERATION_RULE_UPDATE(data: any): void; + AUTO_MODERATION_RULE_DELETE(data: any): void; + AUTO_MODERATION_ACTION_EXECUTION(data: any): void; + GUILD_EMOJIS_UPDATE(data: any): void; + WEBHOOKS_UPDATE(data: any): void; + MESSAGE_POLL_VOTE_ADD(data: any): void; + MESSAGE_POLL_VOTE_REMOVE(data: any): void; + MESSAGE_REACTION_ADD(data: any): void; + MESSAGE_REACTION_REMOVE(data: any): void; + #private; +} +//# sourceMappingURL=eventHandler.d.ts.map \ No newline at end of file diff --git a/dist/src/gateway/eventHandler.d.ts.map b/dist/src/gateway/eventHandler.d.ts.map new file mode 100644 index 00000000..92f394d7 --- /dev/null +++ b/dist/src/gateway/eventHandler.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"eventHandler.d.ts","sourceRoot":"","sources":["../../../src/gateway/eventHandler.js"],"names":[],"mappings":";AA+BA;IAME,kCAUC;IAED,uBA0BC;IAED,yBAMC;IAED,8BAwBC;IAED,8BAUC;IAED,8BAeC;IAED,mCAWC;IAED,mCAcC;IAED,mCAYC;IAED,gCASC;IAED,gCAYC;IAED,gCAYC;IAED,qCAOC;IAED,+BASC;IAED,+BAcC;IAED,+BAYC;IAED,kCAaC;IAED,kCAeC;IAED,qCAwBC;IAED,qCAiBC;IAED,qCAYC;IAED,+BAWC;IAED,kCAWC;IAED,+BASC;IAED,+BAaC;IAED,oCAsBC;IAED,6CAOC;IAED,gCAYC;IAED,gCAoBC;IAED,gCAeC;IAED,qCAsBC;IAED,oCA0EC;IAED,8CAWC;IAED,oCAOC;IAED,oCAOC;IAED,oCAOC;IAED,8CAWC;IAED,8CAkBC;IAED,8CAYC;IAED,gDAsBC;IAED,mDAsBC;IAED,6CAOC;IAED,6CAOC;IAED,6CAOC;IAED,kDAOC;IAED,qCAyFC;IAED,iCAOC;IAED,uCAkBC;IAED,0CAkBC;IAED,sCA4BC;IAED,yCA2BC;;CACF"} \ No newline at end of file diff --git a/dist/src/gateway/index.d.ts b/dist/src/gateway/index.d.ts new file mode 100644 index 00000000..428f5d17 --- /dev/null +++ b/dist/src/gateway/index.d.ts @@ -0,0 +1,27 @@ +export default Shard; +declare class Shard { + constructor(client: any, token: any, url: any, shardId: any, sessionId?: any, sequence?: any, resumeGatewayUrl?: any); + shard: any; + halt(): void; + check(): { + shard: any; + websocketState: any; + lastReconnect: any; + latency: number; + }; + jitter(): number; + updatePresence(name: any, type: any, status: any, afk: any, since: any): void; + zlib: any; + terminateSocketTimeout: NodeJS.Timeout; + resetRetries(): void; + /** + * @param {String} id + */ + set sessionId(id: string); + /** + * @param {String} url + */ + set resumeGatewayUrl(url: string); + #private; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/src/gateway/index.d.ts.map b/dist/src/gateway/index.d.ts.map new file mode 100644 index 00000000..4b6cc4b3 --- /dev/null +++ b/dist/src/gateway/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/gateway/index.js"],"names":[],"mappings":";AAiBA;IAkBE,sHAyCC;IA/BC,WAAoB;IA6ItB,aAGC;IAED;;;;;MAOC;IAED,iBAEC;IAED,8EAIC;IAsFC,UAEE;IA0FF,uCASQ;IAGV,qBAEC;IAED;;OAEG;IACH,0BAEC;IAED;;OAEG;IACH,kCAEC;;CACF"} \ No newline at end of file diff --git a/dist/src/gateway/structures/_heartbeat.d.ts b/dist/src/gateway/structures/_heartbeat.d.ts new file mode 100644 index 00000000..b22f176e --- /dev/null +++ b/dist/src/gateway/structures/_heartbeat.d.ts @@ -0,0 +1,3 @@ +export default _heartbeat; +declare function _heartbeat(d: any): any; +//# sourceMappingURL=_heartbeat.d.ts.map \ No newline at end of file diff --git a/dist/src/gateway/structures/_heartbeat.d.ts.map b/dist/src/gateway/structures/_heartbeat.d.ts.map new file mode 100644 index 00000000..985896fa --- /dev/null +++ b/dist/src/gateway/structures/_heartbeat.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_heartbeat.d.ts","sourceRoot":"","sources":["../../../../src/gateway/structures/_heartbeat.js"],"names":[],"mappings":";AAEA,yCAKC"} \ No newline at end of file diff --git a/dist/src/gateway/structures/_identify.d.ts b/dist/src/gateway/structures/_identify.d.ts new file mode 100644 index 00000000..e957a2b2 --- /dev/null +++ b/dist/src/gateway/structures/_identify.d.ts @@ -0,0 +1,10 @@ +export default _identify; +/** + * Creates an identify payload for the gateway. + * @param {String} token The authorization token. + * @param {Array} shard An array of shard ids which this process is managing. + * @param {Number} intents The intents to use. + * @returns {Buffer} + */ +declare function _identify(token: string, shard: Array, intents: number): Buffer; +//# sourceMappingURL=_identify.d.ts.map \ No newline at end of file diff --git a/dist/src/gateway/structures/_identify.d.ts.map b/dist/src/gateway/structures/_identify.d.ts.map new file mode 100644 index 00000000..3df749c7 --- /dev/null +++ b/dist/src/gateway/structures/_identify.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_identify.d.ts","sourceRoot":"","sources":["../../../../src/gateway/structures/_identify.js"],"names":[],"mappings":";AAGA;;;;;;GAMG;AACH,iDAJW,KAAK,QAAQ,oBAEX,MAAM,CAkClB"} \ No newline at end of file diff --git a/dist/src/gateway/structures/_resume.d.ts b/dist/src/gateway/structures/_resume.d.ts new file mode 100644 index 00000000..d8a50478 --- /dev/null +++ b/dist/src/gateway/structures/_resume.d.ts @@ -0,0 +1,3 @@ +export default _resume; +declare function _resume(token: any, session_id: any, seq: any): any; +//# sourceMappingURL=_resume.d.ts.map \ No newline at end of file diff --git a/dist/src/gateway/structures/_resume.d.ts.map b/dist/src/gateway/structures/_resume.d.ts.map new file mode 100644 index 00000000..b23a721a --- /dev/null +++ b/dist/src/gateway/structures/_resume.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_resume.d.ts","sourceRoot":"","sources":["../../../../src/gateway/structures/_resume.js"],"names":[],"mappings":";AAEA,qEASC"} \ No newline at end of file diff --git a/dist/src/gateway/structures/_updatePresence.d.ts b/dist/src/gateway/structures/_updatePresence.d.ts new file mode 100644 index 00000000..361cb06a --- /dev/null +++ b/dist/src/gateway/structures/_updatePresence.d.ts @@ -0,0 +1,3 @@ +export default _updatePresence; +declare function _updatePresence(name: any, type?: number, status?: string, afk?: boolean, since?: any): any; +//# sourceMappingURL=_updatePresence.d.ts.map \ No newline at end of file diff --git a/dist/src/gateway/structures/_updatePresence.d.ts.map b/dist/src/gateway/structures/_updatePresence.d.ts.map new file mode 100644 index 00000000..9e7b08b5 --- /dev/null +++ b/dist/src/gateway/structures/_updatePresence.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"_updatePresence.d.ts","sourceRoot":"","sources":["../../../../src/gateway/structures/_updatePresence.js"],"names":[],"mappings":";AAEA,6GAwBC"} \ No newline at end of file diff --git a/dist/src/managers/BaseCacheManager.d.ts b/dist/src/managers/BaseCacheManager.d.ts new file mode 100644 index 00000000..290bbcbb --- /dev/null +++ b/dist/src/managers/BaseCacheManager.d.ts @@ -0,0 +1,99 @@ +export default BaseCacheManager; +/** + * The base cache manager for all cache managers. + */ +declare class BaseCacheManager { + static rules: {}; + /** + * Creates a cache manager. + * @param {Client} client The client instance. + * @param {Object} options The options for the cache manager. + * @param {Object} options.structureType The structure type for the cache manager. + * @throws {TypeError} + * @public + * @constructor + */ + constructor(client: Client, { structureType }?: { + structureType: any; + }); + /** + * Gets a value from the cache. + * @param {String} key The key to get. + * @param {Object} options The options for the get method. + * @param {Boolean} options.useRules Whether to use rules or not. + * @returns {Object?} The value from the cache. + * @public + * @method + * @throws {TypeError} + */ + public get(key: string, { useRules }?: { + useRules: boolean; + }): any | null; + /** + * Sets a value in the cache. + * @param {String} key The key to set. + * @param {Object} value The value to set. + * @param {Number} expiry The expiry time in seconds. + * @returns {Object} The value that was set. + * @public + * @method + * @throws {TypeError} + */ + public set(key: string, value: any, expiry?: number): any; + /** + * Expires a bucket. + * @param {String} bucket The bucket to expire. + * @returns {void} + * @public + * @method + */ + public expireBucket(bucket: string): void; + /** + * Deletes a key from the cache. + * @param {String} key The key to delete. + * @returns {Boolean} Whether the key was deleted or not. + * @public + * @method + */ + public delete(key: string): boolean; + /** + * Clears the cache. + * @returns {void} + * @public + * @method + */ + public clear(): void; + /** + * The callback for expiring buckets. + * @returns {void} + * @public + * @method + */ + public _intervalCallback(): void; + /** + * Returns the size of the cache. + * @type {Number} + * @readonly + * @public + */ + public readonly get size(): number; + /** + * Calls a function on each item in the cache. + * @param {Function} callback Callback function to run on each item in the cache. + * @returns {void} + * @public + * @method + */ + public forEach(callback: Function): void; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import Client from "../Client.js"; +//# sourceMappingURL=BaseCacheManager.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/BaseCacheManager.d.ts.map b/dist/src/managers/BaseCacheManager.d.ts.map new file mode 100644 index 00000000..220ae3d7 --- /dev/null +++ b/dist/src/managers/BaseCacheManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BaseCacheManager.d.ts","sourceRoot":"","sources":["../../../src/managers/BaseCacheManager.js"],"names":[],"mappings":";AAIA;;GAEG;AACH;IAIE,iBAAkB;IAElB;;;;;;;;OAQG;IACH,oBAPW,MAAM,sBAEd;QAAwB,aAAa;KACrC,EA8BF;IAkCD;;;;;;;;;OASG;IACH,uCANG;QAAyB,QAAQ;KACjC,GAAU,UAAO,CAYnB;IAED;;;;;;;;;OASG;IACH,0DAOC;IAmBD;;;;;;OAMG;IACH,qCAJa,IAAI,CAgBhB;IA8BD;;;;;;OAMG;IACH,oCAIC;IAED;;;;;OAKG;IACH,gBAJa,IAAI,CAMhB;IAED;;;;;OAKG;IACH,4BAJa,IAAI,CAYhB;IAkCD;;;;;OAKG;IACH,mCAEC;IAED;;;;;;OAMG;IACH,oCAJa,IAAI,CAMhB;IAED;;;;;;OAMG;IACH,mCASC;;CACF;mBArSkB,cAAc"} \ No newline at end of file diff --git a/dist/src/managers/ChannelCacheOptions.d.ts b/dist/src/managers/ChannelCacheOptions.d.ts new file mode 100644 index 00000000..228b84f2 --- /dev/null +++ b/dist/src/managers/ChannelCacheOptions.d.ts @@ -0,0 +1,186 @@ +export default ChannelCacheOptions; +/** + * Represents the cache options for a channel. + * All options are enabled by default. + */ +declare class ChannelCacheOptions { + /** + * Creates the cache options for a channel. + * @param {Number} cache_options The preset cache options for this channel. + * @public + * @constructor + */ + constructor(cache_options: number); + /** + * Sets whether to cache messages or not. + * @param {Boolean} option Whether to cache messages or not. + * @public + * @throws {TypeError} + * @method + */ + public setMessageCaching(option: boolean): void; + /** + * Sets whether to cache messages or not + * @param {Boolean} option The option to set. + * @public + * @throws {TypeError} + * @method + */ + public setFileCaching(option: boolean): void; + /** + * Sets whether to cache messages or not + * @param {Boolean} option The option to set. + * @public + * @throws {TypeError} + * @method + */ + public setContentCaching(option: boolean): void; + /** + * Sets whether to cache messages or not + * @param {Boolean} option The option to set. + * @public + * @throws {TypeError} + * @method + */ + public setPollCaching(option: boolean): void; + /** + * Sets whether to cache messages or not + * @param {Boolean} option The option to set. + * @public + * @throws {TypeError} + * @method + */ + public setReactionCaching(option: boolean): void; + /** + * Sets whether to cache messages or not + * @param {Boolean} option The option to set. + * @public + * @throws {TypeError} + * @method + */ + public setEmbedCaching(option: boolean): void; + /** + * Sets whether to cache messages or not + * @param {Boolean} option The option to set. + * @public + * @throws {TypeError} + * @method + */ + public setAttributeCaching(option: boolean): void; + /** + * Sets whether to cache messages or not + * @param {Boolean} option The option to set. + * @public + * @throws {TypeError} + * @method + */ + public setReferenceCaching(option: boolean): void; + /** + * Sets whether to cache messages or not + * @param {Boolean} option The option to set. + * @public + * @throws {TypeError} + * @method + */ + public setStickerCaching(option: boolean): void; + /** + * Sets whether to cache messages or not + * @param {Boolean} option The option to set. + * @public + * @throws {TypeError} + * @method + */ + public setWebhookCaching(option: boolean): void; + /** + * Disables all caching options. + * @public + * @method + * @returns {void} + */ + public setDisableAll(): void; + /** + * Returns whether to cache messages or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get messageCaching(): boolean; + /** + * Returns whether to cache messages or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get fileCaching(): boolean; + /** + * Returns whether to cache messages or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get contentCaching(): boolean; + /** + * Returns whether to cache messages or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get pollCaching(): boolean; + /** + * Returns whether to cache messages or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get reactionCaching(): boolean; + /** + * Returns whether to cache messages or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get embedCaching(): boolean; + /** + * Returns whether to cache messages or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get attributeCaching(): boolean; + /** + * Returns whether to cache messages or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get referenceCaching(): boolean; + /** + * Returns whether to cache messages or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get stickerCaching(): boolean; + /** + * Returns whether to cache messages or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get webhookCaching(): boolean; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +//# sourceMappingURL=ChannelCacheOptions.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/ChannelCacheOptions.d.ts.map b/dist/src/managers/ChannelCacheOptions.d.ts.map new file mode 100644 index 00000000..27dcfd5f --- /dev/null +++ b/dist/src/managers/ChannelCacheOptions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ChannelCacheOptions.d.ts","sourceRoot":"","sources":["../../../src/managers/ChannelCacheOptions.js"],"names":[],"mappings":";AAKA;;;GAGG;AACH;IAGE;;;;;OAKG;IACH,mCAkBC;IAED;;;;;;OAMG;IACH,gDAQC;IAED;;;;;;OAMG;IACH,6CAQC;IAED;;;;;;OAMG;IACH,gDAQC;IAED;;;;;;OAMG;IACH,6CAQC;IAED;;;;;;OAMG;IACH,iDAQC;IAED;;;;;;OAMG;IACH,8CAQC;IAED;;;;;;OAMG;IACH,kDAQC;IAED;;;;;;OAMG;IACH,kDAQC;IAED;;;;;;OAMG;IACH,gDAQC;IAED;;;;;;OAMG;IACH,gDAQC;IAED;;;;;OAKG;IACH,wBAFa,IAAI,CAKhB;IAED;;;;;OAKG;IACH,8CAKC;IAED;;;;;OAKG;IACH,2CAKC;IAED;;;;;OAKG;IACH,8CAKC;IAED;;;;;OAKG;IACH,2CAKC;IAED;;;;;OAKG;IACH,+CAKC;IAED;;;;;OAKG;IACH,4CAKC;IAED;;;;;OAKG;IACH,gDAKC;IAED;;;;;OAKG;IACH,gDAKC;IAED;;;;;OAKG;IACH,8CAKC;IAED;;;;;OAKG;IACH,8CAKC;IAED;;;OAGG;IACH,0BAQC;IAED;;;;;;OAMG;IACH,mCASC;;CACF"} \ No newline at end of file diff --git a/dist/src/managers/ChannelMessageManager.d.ts b/dist/src/managers/ChannelMessageManager.d.ts new file mode 100644 index 00000000..bec8186d --- /dev/null +++ b/dist/src/managers/ChannelMessageManager.d.ts @@ -0,0 +1,133 @@ +export default ChannelMessageManager; +/** + * Manages all messages within a channel. + */ +declare class ChannelMessageManager extends BaseCacheManager { + static identifier: string; + /** + * Returns the cache manager. + * @param {Client} client The client instance. + * @param {String} guildId The ID of the guild. + * @param {String} channelId The ID of the channel. + * @returns {ChannelMessageManager} + * @public + * @static + * @method + * @throws {TypeError} + */ + public static getCacheManager(client: Client, guildId: string, channelId: string): ChannelMessageManager; + /** + * Gets a message from the cache. + * @param {Client} client The client instance. + * @param {String} guildId The ID of the guild. + * @param {String} channelId The ID of the channel. + * @param {String} messageId The ID of the message. + * @returns {Message} + * @public + * @static + * @method + * @throws {TypeError} + */ + public static getMessage(client: Client, guildId: string, channelId: string, messageId: string): Message; + /** + * Fetches a message from the channel. + * @param {Client} client The client instance. + * @param {String} guildId The ID of the guild. + * @param {String} channelId The ID of the channel. + * @param {String} messageId The ID of the message. + * @returns {Message} + * @public + * @async + * @static + * @method + * @throws {TypeError | Error} + */ + public static fetchMessage(client: Client, guildId: string, channelId: string, messageId: string): Message; + /** + * Fetches a collection of messages from the channel. + * @param {Client} client The client instance. + * @param {String} guildId The ID of the guild. + * @param {String} channelId The ID of the channel. + * @param {Object} options The options for fetching messages. + * @param {String} options.around The ID of the message to fetch messages around. + * @param {String} options.before The ID of the message to fetch messages before. + * @param {String} options.after The ID of the message to fetch messages after. + * @param {Number} options.limit The maximum number of messages to fetch. + * @returns {Array} + * @public + * @async + * @static + * @method + * @throws {TypeError | Error} + */ + public static fetchMessages(client: Client, guildId: string, channelId: string, { around, before, after, limit }?: { + around: string; + before: string; + after: string; + limit: number; + }): Array; + /** + * Bulk deletes channel messages. + * @param {Client} client The client instance. + * @param {String} channelId The id of the channel to purge messages in. + * @param {Array} messages An array of message ids to delete. + * @param {Object} options + * @returns {Promise} + * @public + * @method + * @async + * @throws {TypeError} + * @static + */ + public static purgeChannelMessages(client: Client, channelId: string, messages: Array, { reason }?: any): Promise; + /** + * Creates a channel message manager. + * @param {Client} client The client instance. + * @param {Guild} guild The guild that this message manager belongs to. + * @param {Channel} channel The channel that is being managed. + * @throws {TypeError} + * @constructor + * @public + */ + constructor(client: Client, guild: Guild, channel: Channel); + /** + * The guild that this message manager belongs to. + * @type {Guild} + * @readonly + */ + readonly get guild(): Guild; + /** + * Fetches a collection of messages or a singular message from the channel. + * @param {Object | String} options Either an object of {@link https://discord.com/developers/docs/resources/channel#get-channel-messages-query-string-params|options} or a message id. + * @returns {Promise> | Promise} + * @public + * @async + * @method + * @throws {TypeError | Error} + */ + public fetch(options: any | string): Promise> | Promise; + /** + * Fetches all the pinned messages that belong to the channel. + * @returns {Promise>} + * @public + * @async + * @method + */ + public fetchPinned(): Promise>; + /** + * Adds a message to the cache. + * @param {String} id The ID of the message to cache. + * @param {Message} message The message to cache. + * @returns {Message} + * @public + * @method + * @throws {TypeError} + * @override + */ + public override set(id: string, message: Message): Message; + #private; +} +import BaseCacheManager from "./BaseCacheManager.js"; +import Message from "../structures/Message.js"; +import Client from "../Client.js"; +//# sourceMappingURL=ChannelMessageManager.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/ChannelMessageManager.d.ts.map b/dist/src/managers/ChannelMessageManager.d.ts.map new file mode 100644 index 00000000..81bea90c --- /dev/null +++ b/dist/src/managers/ChannelMessageManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ChannelMessageManager.d.ts","sourceRoot":"","sources":["../../../src/managers/ChannelMessageManager.js"],"names":[],"mappings":";AAMA;;GAEG;AACH;IAIE,0BAA+B;IAsI/B;;;;;;;;;;OAUG;IACH,sCATW,MAAM,uCAGJ,qBAAqB,CAcjC;IAED;;;;;;;;;;;OAWG;IACH,iCAVW,MAAM,0DAIJ,OAAO,CAoBnB;IAED;;;;;;;;;;;;OAYG;IACH,mCAXW,MAAM,0DAIJ,OAAO,CA6DnB;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,oCAfW,MAAM,yEAId;QAAwB,MAAM;QACN,MAAM;QACN,KAAK;QACL,KAAK;KAC7B,GAAU,KAAK,CAAC,OAAO,CAAC,CAgG1B;IAED;;;;;;;;;;;;OAYG;IACH,2CAXW,MAAM,+BAEN,KAAK,QAAQ,qBAEX,OAAO,CAAC,IAAI,CAAC,CAsCzB;IAnZD;;;;;;;;OAQG;IACH,oBAPW,MAAM,SACN,KAAK,WACL,OAAO,EAmCjB;IAED;;;;OAIG;IACH,4BAEC;IAED;;;;;;;;OAQG;IACH,sBAPW,YAAe,GACb,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAuCtD;IAED;;;;;;OAMG;IACH,sBALa,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAmBnC;IAED;;;;;;;;;OASG;IACH,yCAPW,OAAO,GACL,OAAO,CAUnB;;CAiRF;6BA9Z4B,uBAAuB;oBAFhC,0BAA0B;mBAF3B,cAAc"} \ No newline at end of file diff --git a/dist/src/managers/GluonCacheOptions.d.ts b/dist/src/managers/GluonCacheOptions.d.ts new file mode 100644 index 00000000..ea33983b --- /dev/null +++ b/dist/src/managers/GluonCacheOptions.d.ts @@ -0,0 +1,203 @@ +export default GluonCacheOptions; +declare class GluonCacheOptions { + constructor({ userTTL, messageTTL, cacheMessages, cacheUsers, cacheMembers, cacheChannels, cacheGuilds, cacheRoles, cacheVoiceStates, cacheEmojis, cacheInvites, cacheScheduledEvents, }?: {}); + /** + * Set whether gluon should cache messages by default. + * @param {Boolean} value Whether to cache messages or not. + * @returns {GluonCacheOptions} + * @public + * @throws {TypeError} + * @method + */ + public setCacheMessages(value: boolean): GluonCacheOptions; + /** + * Get whether gluon should cache messages by default. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get cacheMessages(): boolean; + /** + * Set whether gluon should cache users by default. + * @param {Boolean} value Whether to cache users or not. + * @returns {GluonCacheOptions} + * @public + * @throws {TypeError} + * @method + */ + public setCacheUsers(value: boolean): GluonCacheOptions; + /** + * Get whether gluon should cache users by default. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get cacheUsers(): boolean; + /** + * Set whether gluon should cache members by default. + * @param {Boolean} value Whether to cache members or not. + * @returns {GluonCacheOptions} + * @public + * @throws {TypeError} + * @method + */ + public setCacheMembers(value: boolean): GluonCacheOptions; + /** + * Get whether gluon should cache members by default. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get cacheMembers(): boolean; + /** + * Set whether gluon should cache channels by default. + * @param {Boolean} value Whether to cache channels or not. + * @returns {GluonCacheOptions} + * @public + * @throws {TypeError} + * @method + */ + public setCacheChannels(value: boolean): GluonCacheOptions; + /** + * Get whether gluon should cache channels by default. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get cacheChannels(): boolean; + /** + * Set whether gluon should cache guilds by default. + * @param {Boolean} value Whether to cache guilds or not. + * @returns {GluonCacheOptions} + * @public + * @throws {TypeError} + * @method + */ + public setCacheGuilds(value: boolean): GluonCacheOptions; + /** + * Get whether gluon should cache guilds by default. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get cacheGuilds(): boolean; + /** + * Set whether gluon should cache roles by default. + * @param {Boolean} value Whether to cache roles or not. + * @returns {GluonCacheOptions} + * @public + * @throws {TypeError} + * @method + */ + public setCacheRoles(value: boolean): GluonCacheOptions; + /** + * Get whether gluon should cache roles by default. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get cacheRoles(): boolean; + /** + * Set whether gluon should cache voice states by default. + * @param {Boolean} value Whether to cache voice states or not. + * @returns {GluonCacheOptions} + * @public + * @throws {TypeError} + * @method + */ + public setCacheVoiceStates(value: boolean): GluonCacheOptions; + /** + * Get whether gluon should cache voice states by default. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get cacheVoiceStates(): boolean; + /** + * Set whether gluon should cache emojis by default. + * @param {Boolean} value Whether to cache emojis or not. + * @returns {GluonCacheOptions} + * @public + * @throws {TypeError} + * @method + */ + public setCacheEmojis(value: boolean): GluonCacheOptions; + /** + * Get whether gluon should cache emojis by default. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get cacheEmojis(): boolean; + /** + * Set whether gluon should cache invites by default. + * @param {Boolean} value Whether to cache invites or not. + * @returns {GluonCacheOptions} + * @public + * @throws {TypeError} + * @method + */ + public setCacheInvites(value: boolean): GluonCacheOptions; + /** + * Get whether gluon should cache invites by default. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get cacheInvites(): boolean; + /** + * Set whether gluon should cache scheduled events by default. + * @param {Boolean} value Whether to cache scheduled events or not. + * @returns {GluonCacheOptions} + * @public + * @throws {TypeError} + * @method + */ + public setCacheScheduledEvents(value: boolean): GluonCacheOptions; + /** + * Get whether gluon should cache scheduled events by default. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get cacheScheduledEvents(): boolean; + /** + * Set the default TTL for users in the cache. + * @param {Number} seconds The number of seconds to cache users for. + * @returns {GluonCacheOptions} + * @public + * @throws {TypeError} + * @method + */ + public setUserTTL(seconds: number): GluonCacheOptions; + /** + * Get the default TTL for users in the cache. + * @type {Number} + * @readonly + * @public + */ + public readonly get userTTL(): number; + /** + * Set the default TTL for messages in the cache. + * @param {Number} seconds The number of seconds to cache messages for. + * @returns {GluonCacheOptions} + * @public + * @throws {TypeError} + * @method + */ + public setMessageTTL(seconds: number): GluonCacheOptions; + /** + * Get the default TTL for messages in the cache. + * @type {Number} + * @readonly + * @public + */ + public readonly get messageTTL(): number; + /** + * @method + * @public + */ + public toString(): string; + #private; +} +//# sourceMappingURL=GluonCacheOptions.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/GluonCacheOptions.d.ts.map b/dist/src/managers/GluonCacheOptions.d.ts.map new file mode 100644 index 00000000..bde28ff1 --- /dev/null +++ b/dist/src/managers/GluonCacheOptions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GluonCacheOptions.d.ts","sourceRoot":"","sources":["../../../src/managers/GluonCacheOptions.js"],"names":[],"mappings":";AAMA;IAIE,+LAgCC;IAED;;;;;;;OAOG;IACH,yCALa,iBAAiB,CAc7B;IAED;;;;;OAKG;IACH,6CAKC;IAED;;;;;;;OAOG;IACH,sCALa,iBAAiB,CAa7B;IAED;;;;;OAKG;IACH,0CAKC;IAED;;;;;;;OAOG;IACH,wCALa,iBAAiB,CAa7B;IAED;;;;;OAKG;IACH,4CAKC;IAED;;;;;;;OAOG;IACH,yCALa,iBAAiB,CAc7B;IAED;;;;;OAKG;IACH,6CAKC;IAED;;;;;;;OAOG;IACH,uCALa,iBAAiB,CAa7B;IAED;;;;;OAKG;IACH,2CAKC;IAED;;;;;;;OAOG;IACH,sCALa,iBAAiB,CAa7B;IAED;;;;;OAKG;IACH,0CAKC;IAED;;;;;;;OAOG;IACH,4CALa,iBAAiB,CAc7B;IAED;;;;;OAKG;IACH,gDAKC;IAED;;;;;;;OAOG;IACH,uCALa,iBAAiB,CAa7B;IAED;;;;;OAKG;IACH,2CAKC;IAED;;;;;;;OAOG;IACH,wCALa,iBAAiB,CAa7B;IAED;;;;;OAKG;IACH,4CAKC;IAED;;;;;;;OAOG;IACH,gDALa,iBAAiB,CAc7B;IAED;;;;;OAKG;IACH,oDAKC;IAED;;;;;;;OAOG;IACH,oCALa,iBAAiB,CAY7B;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;;;OAOG;IACH,uCALa,iBAAiB,CAY7B;IAED;;;;;OAKG;IACH,yCAEC;IAED;;;OAGG;IACH,0BAQC;;CACF"} \ No newline at end of file diff --git a/dist/src/managers/GuildCacheOptions.d.ts b/dist/src/managers/GuildCacheOptions.d.ts new file mode 100644 index 00000000..6b812268 --- /dev/null +++ b/dist/src/managers/GuildCacheOptions.d.ts @@ -0,0 +1,169 @@ +export default GuildCacheOptions; +declare class GuildCacheOptions { + constructor(cache_options: any); + /** + * Whether to cache messages or not. + * @param {Boolean} option Whether to cache messages or not. + * @returns {GuildCacheOptions} + * @throws {TypeError} + * @public + */ + public setMessageCaching(option: boolean): GuildCacheOptions; + /** + * Whether to cache files or not. + * @param {Boolean} option Whether to cache files or not. + * @returns {GuildCacheOptions} + * @throws {TypeError} + * @public + */ + public setFileCaching(option: boolean): GuildCacheOptions; + /** + * Whether to cache voice states or not. + * @param {Boolean} option Whether to cache voice states or not. + * @returns {GuildCacheOptions} + * @throws {TypeError} + * @public + */ + public setVoiceStateCaching(option: boolean): GuildCacheOptions; + /** + * Whether to cache members or not. + * @param {Boolean} option Whether to cache members or not. + * @returns {GuildCacheOptions} + * @throws {TypeError} + * @public + */ + public setMemberCaching(option: boolean): GuildCacheOptions; + /** + * Whether to cache roles or not. + * @param {Boolean} option Whether to cache roles or not. + * @returns {GuildCacheOptions} + * @throws {TypeError} + * @public + */ + public setRoleCaching(option: boolean): GuildCacheOptions; + /** + * Whether to cache channels or not. + * @param {Boolean} option Whether to cache channels or not. + * @returns {GuildCacheOptions} + * @throws {TypeError} + * @public + */ + public setChannelCaching(option: boolean): GuildCacheOptions; + /** + * Whether to cache emojis or not. + * @param {Boolean} option Whether to cache emojis or not. + * @returns {GuildCacheOptions} + * @throws {TypeError} + * @public + */ + public setEmojiCaching(option: boolean): GuildCacheOptions; + /** + * Whether to cache threads or not. + * @param {Boolean} option Whether to cache threads or not. + * @returns {GuildCacheOptions} + * @throws {TypeError} + * @public + */ + public setThreadCaching(option: boolean): GuildCacheOptions; + /** + * Whether to cache invites or not. + * @param {Boolean} option Whether to cache invites or not. + * @returns {GuildCacheOptions} + * @throws {TypeError} + * @public + */ + public setInviteCaching(option: boolean): GuildCacheOptions; + /** + * Whether to cache scheduled events or not. + * @param {Boolean} option Whether to cache scheduled events or not. + * @returns {GuildCacheOptions} + * @throws {TypeError} + * @public + */ + public setScheduledEventCaching(option: boolean): GuildCacheOptions; + /** + * Returns whether to cache files or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get messageCaching(): boolean; + /** + * Returns whether to cache files or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get fileCaching(): boolean; + /** + * Returns whether to cache voice states or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get voiceStateCaching(): boolean; + /** + * Returns whether to cache members or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get memberCaching(): boolean; + /** + * Returns whether to cache roles or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get roleCaching(): boolean; + /** + * Returns whether to cache channels or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get channelCaching(): boolean; + /** + * Returns whether to cache emojis or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get emojiCaching(): boolean; + /** + * Returns whether to cache threads or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get threadCaching(): boolean; + /** + * Returns whether to cache invites or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get inviteCaching(): boolean; + /** + * Returns whether to cache scheduled events or not. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get scheduledEventCaching(): boolean; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +//# sourceMappingURL=GuildCacheOptions.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/GuildCacheOptions.d.ts.map b/dist/src/managers/GuildCacheOptions.d.ts.map new file mode 100644 index 00000000..e366e65b --- /dev/null +++ b/dist/src/managers/GuildCacheOptions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GuildCacheOptions.d.ts","sourceRoot":"","sources":["../../../src/managers/GuildCacheOptions.js"],"names":[],"mappings":";AAKA;IAGE,gCAOC;IAED;;;;;;OAMG;IACH,2CAJa,iBAAiB,CAa7B;IAED;;;;;;OAMG;IACH,wCAJa,iBAAiB,CAY7B;IAED;;;;;;OAMG;IACH,8CAJa,iBAAiB,CAY7B;IAED;;;;;;OAMG;IACH,0CAJa,iBAAiB,CAY7B;IAED;;;;;;OAMG;IACH,wCAJa,iBAAiB,CAY7B;IAED;;;;;;OAMG;IACH,2CAJa,iBAAiB,CAY7B;IAED;;;;;;OAMG;IACH,yCAJa,iBAAiB,CAY7B;IAED;;;;;;OAMG;IACH,0CAJa,iBAAiB,CAY7B;IAED;;;;;;OAMG;IACH,0CAJa,iBAAiB,CAY7B;IAED;;;;;;OAMG;IACH,kDAJa,iBAAiB,CAY7B;IAED;;;;;OAKG;IACH,8CAKC;IAED;;;;;OAKG;IACH,2CAKC;IAeD;;;;;OAKG;IACH,iDAKC;IAED;;;;;OAKG;IACH,6CAKC;IAED;;;;;OAKG;IACH,2CAKC;IAED;;;;;OAKG;IACH,8CAKC;IAED;;;;;OAKG;IACH,4CAKC;IAED;;;;;OAKG;IACH,6CAKC;IAED;;;;;OAKG;IACH,6CAKC;IAED;;;;;OAKG;IACH,qDAKC;IAED;;;OAGG;IACH,0BAMC;IAED;;;;;;OAMG;IACH,mCASC;;CACF"} \ No newline at end of file diff --git a/dist/src/managers/GuildChannelsManager.d.ts b/dist/src/managers/GuildChannelsManager.d.ts new file mode 100644 index 00000000..dafb946f --- /dev/null +++ b/dist/src/managers/GuildChannelsManager.d.ts @@ -0,0 +1,74 @@ +export default GuildChannelsManager; +/** + * Manages all channels within a guild. + */ +declare class GuildChannelsManager extends BaseCacheManager { + static identifier: string; + /** + * Returns the channel for a guild. + * @param {Client} client The client instance. + * @param {String} guildId The ID of the guild to get the channel from. + * @param {String} channelId The ID of the channel to get. + * @returns {VoiceChannel | TextChannel | Thread | CategoryChannel} + */ + static getChannel(client: Client, guildId: string, channelId: string): VoiceChannel | TextChannel | Thread | CategoryChannel; + /** + * Returns the cache manager for a guild. + * @param {Client} client The client instance. + * @param {String} guildId The ID of the guild the cache manager belongs to. + * @returns {GuildChannelsManager} + * @throws {TypeError} + * @public + * @static + * @method + */ + public static getCacheManager(client: Client, guildId: string): GuildChannelsManager; + /** + * Fetches a channel, checking the cache first. + * @param {Client} client The client instance. + * @param {String} guildId The id of the guild the channel belongs to. + * @param {String} channelId The id of the channel to fetch. + * @returns {Promise} + * @public + * @method + * @async + * @throws {TypeError} + */ + public static fetchChannel(client: Client, guildId: string, channelId: string): Promise; + /** + * Creates a guild channel manager. + * @param {Client} client The client instance. + * @param {Guild} guild The guild that this channel manager belongs to. + */ + constructor(client: Client, guild: Guild); + /** + * Fetches a particular channel belonging to this guild. + * @param {String} channel_id The id of the channel to fetch. + * @returns {Promise | Promise | Promise} The fetched channel. + * @public + * @async + * @method + * @throws {TypeError | Error} + */ + public fetch(channel_id: string): Promise | Promise | Promise; + /** + * Adds a channel to the cache. + * @param {String} id The ID of the channel to cache. + * @param {VoiceChannel | TextChannel | Thread | Channel | CategoryChannel} channel The channel to cache. + * @returns {VoiceChannel | TextChannel | Thread | Channel | CategoryChannel} + * @public + * @method + * @throws {TypeError} + * @override + */ + public override set(id: string, channel: VoiceChannel | TextChannel | Thread | Channel | CategoryChannel): VoiceChannel | TextChannel | Thread | Channel | CategoryChannel; + #private; +} +import BaseCacheManager from "./BaseCacheManager.js"; +import VoiceChannel from "../structures/VoiceChannel.js"; +import Thread from "../structures/Thread.js"; +import TextChannel from "../structures/TextChannel.js"; +import Channel from "../structures/Channel.js"; +import CategoryChannel from "../structures/CategoryChannel.js"; +import Client from "../Client.js"; +//# sourceMappingURL=GuildChannelsManager.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/GuildChannelsManager.d.ts.map b/dist/src/managers/GuildChannelsManager.d.ts.map new file mode 100644 index 00000000..3ea34c92 --- /dev/null +++ b/dist/src/managers/GuildChannelsManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GuildChannelsManager.d.ts","sourceRoot":"","sources":["../../../src/managers/GuildChannelsManager.js"],"names":[],"mappings":";AAUA;;GAEG;AACH;IAGE,0BAA+B;IA8E/B;;;;;;OAMG;IACH,0BALW,MAAM,uCAGJ,YAAY,GAAG,WAAW,GAAG,MAAM,GAAG,eAAe,CAUjE;IAED;;;;;;;;;OASG;IACH,sCARW,MAAM,oBAEJ,oBAAoB,CAYhC;IAED;;;;;;;;;;OAUG;IACH,mCATW,MAAM,uCAGJ,OAAO,CAAC,WAAW,GAAG,YAAY,CAAC,CAoB/C;IAzID;;;;OAIG;IACH,oBAHW,MAAM,SACN,KAAK,EAuBf;IAED;;;;;;;;OAQG;IACH,kCANa,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAkB1E;IAED;;;;;;;;;OASG;IACH,yCAPW,YAAY,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,eAAe,GAC7D,YAAY,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,eAAe,CAoB3E;;CA+DF;6BApJ4B,uBAAuB;yBAF3B,+BAA+B;mBADrC,yBAAyB;wBADpB,8BAA8B;oBADlC,0BAA0B;4BADlB,kCAAkC;mBAD3C,cAAc"} \ No newline at end of file diff --git a/dist/src/managers/GuildEmojisManager.d.ts b/dist/src/managers/GuildEmojisManager.d.ts new file mode 100644 index 00000000..20767253 --- /dev/null +++ b/dist/src/managers/GuildEmojisManager.d.ts @@ -0,0 +1,39 @@ +export default GuildEmojisManager; +/** + * Manages all emojis within a guild. + */ +declare class GuildEmojisManager extends BaseCacheManager { + static identifier: string; + /** + * Creates a guild emoji manager. + * @param {Client} client The client instance. + * @param {Guild} guild The guild that this emoji manager belongs to. + */ + constructor(client: Client, guild: Guild); + /** + * Fetches a particular emoji that belongs to this guild. + * @param {String} emojiId The id of the emoji to fetch. + * @returns {Promise} The fetched emoji. + * @public + * @async + * @method + * @throws {TypeError | Error} + */ + public fetch(emojiId: string): Promise; + /** + * Adds an emoji to the cache. + * @param {String} id The ID of the emoji to cache. + * @param {Emoji} emoji The emoji to cache. + * @returns {Emoji} + * @public + * @method + * @throws {TypeError} + * @override + */ + public override set(id: string, emoji: Emoji): Emoji; + #private; +} +import BaseCacheManager from "./BaseCacheManager.js"; +import Emoji from "../structures/Emoji.js"; +import Client from "../Client.js"; +//# sourceMappingURL=GuildEmojisManager.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/GuildEmojisManager.d.ts.map b/dist/src/managers/GuildEmojisManager.d.ts.map new file mode 100644 index 00000000..c7b08e78 --- /dev/null +++ b/dist/src/managers/GuildEmojisManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GuildEmojisManager.d.ts","sourceRoot":"","sources":["../../../src/managers/GuildEmojisManager.js"],"names":[],"mappings":";AAIA;;GAEG;AACH;IAGE,0BAA6B;IAC7B;;;;OAIG;IACH,oBAHW,MAAM,SACN,KAAK,EAuBf;IAED;;;;;;;;OAQG;IACH,+BANa,OAAO,CAAC,KAAK,CAAC,CAmB1B;IAED;;;;;;;;;OASG;IACH,uCAPW,KAAK,GACH,KAAK,CAUjB;;CACF;6BA5E4B,uBAAuB;kBADlC,wBAAwB;mBADvB,cAAc"} \ No newline at end of file diff --git a/dist/src/managers/GuildInviteManager.d.ts b/dist/src/managers/GuildInviteManager.d.ts new file mode 100644 index 00000000..f0a1cb4a --- /dev/null +++ b/dist/src/managers/GuildInviteManager.d.ts @@ -0,0 +1,38 @@ +export default GuildInviteManager; +/** + * Manages all invites within a guild. + */ +declare class GuildInviteManager extends BaseCacheManager { + static identifier: string; + /** + * Creates a guild invite manager. + * @param {Client} client The client instance. + * @param {Guild} guild The guild that this invite manager belongs to. + */ + constructor(client: Client, guild: Guild); + /** + * Fetches all invites for this guild. + * @returns {Promise?>} The fetched invites. + * @public + * @async + * @method + * @throws {Error} + */ + public fetch(): Promise | null>; + /** + * Adds an invite to the cache. + * @param {String} code The code of the invite to cache. + * @param {Invite} invite The invite to cache. + * @returns {Invite} + * @public + * @method + * @throws {TypeError} + * @override + */ + public override set(code: string, invite: Invite): Invite; + #private; +} +import BaseCacheManager from "./BaseCacheManager.js"; +import Invite from "../structures/Invite.js"; +import Client from "../Client.js"; +//# sourceMappingURL=GuildInviteManager.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/GuildInviteManager.d.ts.map b/dist/src/managers/GuildInviteManager.d.ts.map new file mode 100644 index 00000000..69e68a85 --- /dev/null +++ b/dist/src/managers/GuildInviteManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GuildInviteManager.d.ts","sourceRoot":"","sources":["../../../src/managers/GuildInviteManager.js"],"names":[],"mappings":";AAMA;;GAEG;AACH;IAGE,0BAA8B;IAC9B;;;;OAIG;IACH,oBAHW,MAAM,SACN,KAAK,EAuBf;IAED;;;;;;;OAOG;IACH,gBANa,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,OAAC,CAAC,CAwBnC;IAED;;;;;;;;;OASG;IACH,0CAPW,MAAM,GACJ,MAAM,CAUlB;;CACF;6BAhF4B,uBAAuB;mBAFjC,yBAAyB;mBAFzB,cAAc"} \ No newline at end of file diff --git a/dist/src/managers/GuildManager.d.ts b/dist/src/managers/GuildManager.d.ts new file mode 100644 index 00000000..247828ee --- /dev/null +++ b/dist/src/managers/GuildManager.d.ts @@ -0,0 +1,35 @@ +export default GuildManager; +/** + * Manages all guilds belonging to this client. + */ +declare class GuildManager extends BaseCacheManager { + static identifier: string; + /** + * Returns the cache manager. + * @param {Client} client The client instance. + * @returns {GuildManager} + */ + static getCacheManager(client: Client): GuildManager; + static getGuild(client: any, guildId: any): any; + /** + * Creates a guild manager. + * @param {Client} client The client instance. + */ + constructor(client: Client); + /** + * Adds a guild to the cache. + * @param {String} id The ID of the guild to cache + * @param {Guild} guild The guild to cache. + * @returns {Guild} + * @public + * @method + * @throws {TypeError} + * @override + */ + public override set(id: string, guild: Guild): Guild; + #private; +} +import BaseCacheManager from "./BaseCacheManager.js"; +import Guild from "../structures/Guild.js"; +import Client from "../Client.js"; +//# sourceMappingURL=GuildManager.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/GuildManager.d.ts.map b/dist/src/managers/GuildManager.d.ts.map new file mode 100644 index 00000000..23c747b1 --- /dev/null +++ b/dist/src/managers/GuildManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GuildManager.d.ts","sourceRoot":"","sources":["../../../src/managers/GuildManager.js"],"names":[],"mappings":";AAIA;;GAEG;AACH;IAEE,0BAA6B;IAmC7B;;;;OAIG;IACH,+BAHW,MAAM,GACJ,YAAY,CAMxB;IAED,gDAMC;IAnDD;;;OAGG;IACH,oBAFW,MAAM,EAchB;IAED;;;;;;;;;OASG;IACH,uCAPW,KAAK,GACH,KAAK,CAUjB;;CAoBF;6BA5D4B,uBAAuB;kBADlC,wBAAwB;mBADvB,cAAc"} \ No newline at end of file diff --git a/dist/src/managers/GuildMemberManager.d.ts b/dist/src/managers/GuildMemberManager.d.ts new file mode 100644 index 00000000..66186acc --- /dev/null +++ b/dist/src/managers/GuildMemberManager.d.ts @@ -0,0 +1,89 @@ +export default GuildMemberManager; +/** + * Manages all members belonging to this guild. + */ +declare class GuildMemberManager extends BaseCacheManager { + static identifier: string; + /** + * Returns the cache manager. + * @param {Client} client The client instance. + * @param {String} guildId The ID of the guild. + * @returns {GuildMemberManager} + */ + static getCacheManager(client: Client, guildId: string): GuildMemberManager; + /** + * Fetches a member, checking the cache first. + * @param {Client} client The client instance. + * @param {String} guildId The id of the guild the member belongs to. + * @param {String} userId The id of the member to fetch. + * @returns {Promise} + * @public + * @method + * @async + * @throws {TypeError} + * @static + */ + public static fetchMember(client: Client, guildId: string, userId: string): Promise; + /** + * Searches for members via a search query. + * @param {Client} client The client instance. + * @param {String} guildId The id of the guild to search. + * @param {String} query The search query. + * @returns {Promise?>} The members which match the search query. + * @public + * @method + * @async + * @throws {TypeError} + * @static + */ + public static search(client: Client, guildId: string, query: string): Promise | null>; + /** + * Creates a member manager. + * @param {Client} client The client instance. + * @param {Guild} guild The guild that this member manager belongs to. + */ + constructor(client: Client, guild: Guild); + /** + * The guild that this member manager belongs to. + * @type {Guild} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * Fetches a member. + * @param {String} user_id The id of the member to fetch. + * @returns {Promise} The fetched member. + * @async + * @method + * @public + * @throws {TypeError | Error} + */ + public fetch(user_id: string): Promise; + /** + * Searches for members via a search query. + * @param {String} query The search query. + * @returns {Promise?>} The members which match the search query. + * @async + * @method + * @public + * @throws {TypeError | Error} + */ + public search(query: string): Promise | null>; + /** + * Adds a member to the cache. + * @param {String} id The ID of the member + * @param {Member} member The member to cache. + * @returns {Member} + * @method + * @public + * @throws {TypeError} + * @override + */ + public override set(id: string, member: Member): Member; + #private; +} +import BaseCacheManager from "./BaseCacheManager.js"; +import Member from "../structures/Member.js"; +import Client from "../Client.js"; +//# sourceMappingURL=GuildMemberManager.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/GuildMemberManager.d.ts.map b/dist/src/managers/GuildMemberManager.d.ts.map new file mode 100644 index 00000000..b42e6a35 --- /dev/null +++ b/dist/src/managers/GuildMemberManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GuildMemberManager.d.ts","sourceRoot":"","sources":["../../../src/managers/GuildMemberManager.js"],"names":[],"mappings":";AAIA;;GAEG;AACH;IAGE,0BAA8B;IAwF9B;;;;;OAKG;IACH,+BAJW,MAAM,oBAEJ,kBAAkB,CAQ9B;IAED;;;;;;;;;;;OAWG;IACH,kCAVW,MAAM,oCAGJ,OAAO,CAAC,MAAM,CAAC,CA+B3B;IAED;;;;;;;;;;;OAWG;IACH,6BAVW,MAAM,mCAGJ,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,OAAC,CAAC,CAsCnC;IAtLD;;;;OAIG;IACH,oBAHW,MAAM,SACN,KAAK,EAuBf;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;;;;OAQG;IACH,+BANa,OAAO,CAAC,MAAM,CAAC,CAY3B;IAED;;;;;;;;OAQG;IACH,8BANa,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,OAAC,CAAC,CAWnC;IAED;;;;;;;;;OASG;IACH,wCAPW,MAAM,GACJ,MAAM,CAUlB;;CAkGF;6BAhM4B,uBAAuB;mBADjC,yBAAyB;mBADzB,cAAc"} \ No newline at end of file diff --git a/dist/src/managers/GuildRoleManager.d.ts b/dist/src/managers/GuildRoleManager.d.ts new file mode 100644 index 00000000..870c7527 --- /dev/null +++ b/dist/src/managers/GuildRoleManager.d.ts @@ -0,0 +1,74 @@ +export default GuildRoleManager; +/** + * Manages all roles belonging to a guild. + */ +declare class GuildRoleManager extends BaseCacheManager { + static identifier: string; + /** + * Returns a role from the cache. + * @param {Client} client The client instance. + * @param {String} guildId The ID of the guild. + * @param {String} roleId The ID of the role. + * @returns {Role?} + * @public + * @static + * @method + * @throws {TypeError} + */ + public static getRole(client: Client, guildId: string, roleId: string): Role | null; + /** + * Returns the cache manager. + * @param {Client} client The client instance. + * @param {String} guildId The ID of the guild. + * @returns {GuildRoleManager} + * @public + * @static + * @method + * @throws {TypeError} + */ + public static getCacheManager(client: Client, guildId: string): GuildRoleManager; + /** + * Fetches a role, checking the cache first. + * @param {String} guildId The id of the guild the role belongs to. + * @param {String?} roleId The id of the role to fetch, or null to return all roles. + * @returns {Promise>} + * @public + * @method + * @async + * @throws {TypeError} + * @static + */ + public static fetchRole(client: any, guildId: string, roleId: string | null): Promise>; + /** + * Creates a role manager. + * @param {Client} client The client instance. + * @param {Guild} guild The guild that this role manager belongs to. + */ + constructor(client: Client, guild: Guild); + /** + * Fetches a role that belongs to this guild. + * @param {String} role_id The id of the role to fetch. + * @returns {Promise} The fetched role. + * @async + * @public + * @method + * @throws {TypeError | Error} + */ + public fetch(role_id: string): Promise; + /** + * Adds a role to the cache. + * @param {String} id The ID of the role to cache + * @param {Role} role The role to cache. + * @returns {Role} + * @public + * @method + * @throws {TypeError} + * @override + */ + public override set(id: string, role: Role): Role; + #private; +} +import BaseCacheManager from "./BaseCacheManager.js"; +import Role from "../structures/Role.js"; +import Client from "../Client.js"; +//# sourceMappingURL=GuildRoleManager.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/GuildRoleManager.d.ts.map b/dist/src/managers/GuildRoleManager.d.ts.map new file mode 100644 index 00000000..76b6af94 --- /dev/null +++ b/dist/src/managers/GuildRoleManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GuildRoleManager.d.ts","sourceRoot":"","sources":["../../../src/managers/GuildRoleManager.js"],"names":[],"mappings":";AAKA;;GAEG;AACH;IAGE,0BAA4B;IA2E5B;;;;;;;;;;OAUG;IACH,8BATW,MAAM,oCAGJ,IAAI,OAAC,CAcjB;IAED;;;;;;;;;OASG;IACH,sCARW,MAAM,oBAEJ,gBAAgB,CAY5B;IAED;;;;;;;;;;OAUG;IACH,8DARW,aAAO,GACL,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAqCvC;IA1JD;;;;OAIG;IACH,oBAHW,MAAM,SACN,KAAK,EAuBf;IAED;;;;;;;;OAQG;IACH,+BANa,OAAO,CAAC,IAAI,CAAC,CAyBzB;IAED;;;;;;;;;OASG;IACH,sCAPW,IAAI,GACF,IAAI,CAUhB;;CAmFF;6BArK4B,uBAAuB;iBADnC,uBAAuB;mBADrB,cAAc"} \ No newline at end of file diff --git a/dist/src/managers/GuildScheduledEventManager.d.ts b/dist/src/managers/GuildScheduledEventManager.d.ts new file mode 100644 index 00000000..3f6a7c56 --- /dev/null +++ b/dist/src/managers/GuildScheduledEventManager.d.ts @@ -0,0 +1,39 @@ +export default GuildScheduledEventManager; +declare class GuildScheduledEventManager extends BaseCacheManager { + static identifier: string; + constructor(client: any, guild: any); + /** + * Retrieves all scheduled events for this guild. + * @returns {Promise>} + * @async + * @method + * @public + * @throws {Error} + */ + public list(): Promise>; + /** + * Fetches a scheduled event from the API. + * @param {String} scheduled_event_id The ID of the event to fetch. + * @returns {Promise} + * @async + * @method + * @public + * @throws {TypeError | Error} + */ + public fetch(scheduled_event_id: string): Promise; + /** + * Cache a scheduled event. + * @param {String} id The ID of the event to cache. + * @param {ScheduledEvent} event The event to cache. + * @returns {ScheduledEvent} + * @throws {TypeError} + * @public + * @method + * @override + */ + public override set(id: string, event: ScheduledEvent): ScheduledEvent; + #private; +} +import BaseCacheManager from "./BaseCacheManager.js"; +import ScheduledEvent from "../structures/ScheduledEvent.js"; +//# sourceMappingURL=GuildScheduledEventManager.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/GuildScheduledEventManager.d.ts.map b/dist/src/managers/GuildScheduledEventManager.d.ts.map new file mode 100644 index 00000000..cdd58a6e --- /dev/null +++ b/dist/src/managers/GuildScheduledEventManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GuildScheduledEventManager.d.ts","sourceRoot":"","sources":["../../../src/managers/GuildScheduledEventManager.js"],"names":[],"mappings":";AAIA;IAGE,0BAA6B;IAC7B,qCAqBC;IAED;;;;;;;OAOG;IACH,eANa,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAsB1C;IAED;;;;;;;;OAQG;IACH,0CANa,OAAO,CAAC,cAAc,CAAC,CAqBnC;IAED;;;;;;;;;OASG;IACH,uCAPW,cAAc,GACZ,cAAc,CAU1B;;CACF;6BAhG4B,uBAAuB;2BADzB,iCAAiC"} \ No newline at end of file diff --git a/dist/src/managers/GuildVoiceStatesManager.d.ts b/dist/src/managers/GuildVoiceStatesManager.d.ts new file mode 100644 index 00000000..43d332c4 --- /dev/null +++ b/dist/src/managers/GuildVoiceStatesManager.d.ts @@ -0,0 +1,22 @@ +export default GuildVoiceStatesManager; +/** + * Manages all voice states belonging to a guild. + */ +declare class GuildVoiceStatesManager extends BaseCacheManager { + static identifier: string; + constructor(client: any); + /** + * Adds a voice state to the cache. + * @param {String} id The ID of the voice state to cache. + * @param {VoiceState} voiceState The voice state to cache. + * @returns {VoiceState} + * @throws {TypeError} + * @public + * @method + * @override + */ + public override set(id: string, voiceState: VoiceState): VoiceState; +} +import BaseCacheManager from "./BaseCacheManager.js"; +import VoiceState from "../structures/VoiceState.js"; +//# sourceMappingURL=GuildVoiceStatesManager.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/GuildVoiceStatesManager.d.ts.map b/dist/src/managers/GuildVoiceStatesManager.d.ts.map new file mode 100644 index 00000000..5d612307 --- /dev/null +++ b/dist/src/managers/GuildVoiceStatesManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GuildVoiceStatesManager.d.ts","sourceRoot":"","sources":["../../../src/managers/GuildVoiceStatesManager.js"],"names":[],"mappings":";AAIA;;GAEG;AACH;IACE,0BAAkC;IAClC,yBAKC;IACD;;;;;;;;;OASG;IACH,4CAPW,UAAU,GACR,UAAU,CAUtB;CACF;6BA5B4B,uBAAuB;uBAD7B,6BAA6B"} \ No newline at end of file diff --git a/dist/src/managers/MessagePollManager.d.ts b/dist/src/managers/MessagePollManager.d.ts new file mode 100644 index 00000000..7a01de07 --- /dev/null +++ b/dist/src/managers/MessagePollManager.d.ts @@ -0,0 +1,39 @@ +export default MessagePollManager; +/** + * Manages a poll for a message. + */ +declare class MessagePollManager { + /** + * Creates a message poll manager. + * @param {Object} existingResponses Existing responses for a poll. + */ + constructor(client: any, existingResponses?: any); + /** + * Adds a response to a poll. + * @param {String} user_id The id of the user who voted. + * @param {Number} answer_id The id of the answer that was voted for. + * @throws {TypeError} + * @public + * @method + */ + public _addVote(user_id: string, answer_id: number): void; + /** + * Removes a response from a poll. + * @param {String} user_id The id of the user whose vote was removed. + * @param {Number} answer_id The id of the answer for which the vote was removed. + * @throws {TypeError} + * @public + * @method + */ + public _removeVote(user_id: string, answer_id: number): void; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +//# sourceMappingURL=MessagePollManager.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/MessagePollManager.d.ts.map b/dist/src/managers/MessagePollManager.d.ts.map new file mode 100644 index 00000000..81bfbc88 --- /dev/null +++ b/dist/src/managers/MessagePollManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MessagePollManager.d.ts","sourceRoot":"","sources":["../../../src/managers/MessagePollManager.js"],"names":[],"mappings":";AAGA;;GAEG;AACH;IAGE;;;OAGG;IACH,kDAyBC;IAED;;;;;;;OAOG;IACH,0DAYC;IAED;;;;;;;OAOG;IACH,6DAcC;IAED;;;;;;OAMG;IACH,mCAuBC;;CACF"} \ No newline at end of file diff --git a/dist/src/managers/MessageReactionManager.d.ts b/dist/src/managers/MessageReactionManager.d.ts new file mode 100644 index 00000000..3da07b30 --- /dev/null +++ b/dist/src/managers/MessageReactionManager.d.ts @@ -0,0 +1,40 @@ +export default MessageReactionManager; +/** + * Manages the reactions of a message. + */ +declare class MessageReactionManager { + /** + * Creates a message reaction manager. + * @param {Object} existingReactions Existing reactions for a message. + */ + constructor(client: any, guild: any, existingReactions?: any); + /** + * Adds a reaction to a message. + * @param {String} userId The id of the user who reacted. + * @param {String} emoji The id or unicode emoji that was reacted with. + * @param {Object} data The raw MESSAGE_REACTION_ADD data. + * @throws {TypeError} + * @public + * @method + */ + public _addReaction(userId: string, emoji: string, data: any): void; + /** + * Removes a reaction from a message. + * @param {String} userId The id of the user whose reaction was removed. + * @param {String} emoji The id or unicode emoji for which the reaction was removed. + * @throws {TypeError} + * @public + * @method + */ + public _removeReaction(userId: string, emoji: string): void; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +//# sourceMappingURL=MessageReactionManager.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/MessageReactionManager.d.ts.map b/dist/src/managers/MessageReactionManager.d.ts.map new file mode 100644 index 00000000..771fba8d --- /dev/null +++ b/dist/src/managers/MessageReactionManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"MessageReactionManager.d.ts","sourceRoot":"","sources":["../../../src/managers/MessageReactionManager.js"],"names":[],"mappings":";AAIA;;GAEG;AACH;IAIE;;;OAGG;IACH,8DAoCC;IAED;;;;;;;;OAQG;IACH,oEAgBC;IAED;;;;;;;OAOG;IACH,4DAYC;IAED;;;;;;OAMG;IACH,mCAgBC;;CACF"} \ No newline at end of file diff --git a/dist/src/managers/UserManager.d.ts b/dist/src/managers/UserManager.d.ts new file mode 100644 index 00000000..ff0988cb --- /dev/null +++ b/dist/src/managers/UserManager.d.ts @@ -0,0 +1,38 @@ +export default UserManager; +/** + * Manages all the users belonging to a client. + */ +declare class UserManager extends BaseCacheManager { + static identifier: string; + /** + * Creates a user manager. + * @param {Client} client The client instance. + */ + constructor(client: Client); + /** + * Fetches a particular user. + * @param {String} userId The id of the user to fetch. + * @returns {Promise} The fetched user. + * @public + * @async + * @method + * @throws {TypeError | Error} + */ + public fetch(userId: string): Promise; + /** + * Adds a user to the cache. + * @param {String} id The ID of the user to cache. + * @param {User} user The user to cache. + * @returns {User} + * @public + * @method + * @throws {TypeError} + * @override + */ + public override set(id: string, user: User): User; + #private; +} +import BaseCacheManager from "./BaseCacheManager.js"; +import User from "../structures/User.js"; +import Client from "../Client.js"; +//# sourceMappingURL=UserManager.d.ts.map \ No newline at end of file diff --git a/dist/src/managers/UserManager.d.ts.map b/dist/src/managers/UserManager.d.ts.map new file mode 100644 index 00000000..4c8f5a5a --- /dev/null +++ b/dist/src/managers/UserManager.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"UserManager.d.ts","sourceRoot":"","sources":["../../../src/managers/UserManager.js"],"names":[],"mappings":";AAIA;;GAEG;AACH;IAEE,0BAA4B;IAC5B;;;OAGG;IACH,oBAFW,MAAM,EAchB;IAED;;;;;;;;OAQG;IACH,8BANa,OAAO,CAAC,IAAI,CAAC,CAgBzB;IAED;;;;;;;;;OASG;IACH,sCAPW,IAAI,GACF,IAAI,CAUhB;;CACF;6BA9D4B,uBAAuB;iBADnC,uBAAuB;mBADrB,cAAc"} \ No newline at end of file diff --git a/dist/src/mocks/handlers.d.ts b/dist/src/mocks/handlers.d.ts new file mode 100644 index 00000000..cb4f2ec2 --- /dev/null +++ b/dist/src/mocks/handlers.d.ts @@ -0,0 +1,2 @@ +export const handlers: any[]; +//# sourceMappingURL=handlers.d.ts.map \ No newline at end of file diff --git a/dist/src/mocks/handlers.d.ts.map b/dist/src/mocks/handlers.d.ts.map new file mode 100644 index 00000000..45131bab --- /dev/null +++ b/dist/src/mocks/handlers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/mocks/handlers.js"],"names":[],"mappings":"AAIA,6BAKG"} \ No newline at end of file diff --git a/dist/src/mocks/node.d.ts b/dist/src/mocks/node.d.ts new file mode 100644 index 00000000..01d43a50 --- /dev/null +++ b/dist/src/mocks/node.d.ts @@ -0,0 +1,2 @@ +export const server: import("msw/node").SetupServerApi; +//# sourceMappingURL=node.d.ts.map \ No newline at end of file diff --git a/dist/src/mocks/node.d.ts.map b/dist/src/mocks/node.d.ts.map new file mode 100644 index 00000000..409b4755 --- /dev/null +++ b/dist/src/mocks/node.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/mocks/node.js"],"names":[],"mappings":"AAGA,uDAA+C"} \ No newline at end of file diff --git a/dist/src/rest/betterRequestHandler.d.ts b/dist/src/rest/betterRequestHandler.d.ts new file mode 100644 index 00000000..8609aea6 --- /dev/null +++ b/dist/src/rest/betterRequestHandler.d.ts @@ -0,0 +1,13 @@ +export default BetterRequestHandler; +declare class BetterRequestHandler { + constructor(client: any, token: any); + /** + * The latency of the request handler. + * @type {Number} + * @readonly + */ + readonly get latency(): number; + makeRequest(request: any, params: any, body: any): Promise; + #private; +} +//# sourceMappingURL=betterRequestHandler.d.ts.map \ No newline at end of file diff --git a/dist/src/rest/betterRequestHandler.d.ts.map b/dist/src/rest/betterRequestHandler.d.ts.map new file mode 100644 index 00000000..e8c3adbf --- /dev/null +++ b/dist/src/rest/betterRequestHandler.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"betterRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/rest/betterRequestHandler.js"],"names":[],"mappings":";AAkBA;IAcE,qCA2EC;IAED;;;;OAIG;IACH,+BAEC;IAkDD,gEAuCC;;CA2KF"} \ No newline at end of file diff --git a/dist/src/rest/endpoints.d.ts b/dist/src/rest/endpoints.d.ts new file mode 100644 index 00000000..b3805cce --- /dev/null +++ b/dist/src/rest/endpoints.d.ts @@ -0,0 +1,385 @@ +declare namespace _default { + namespace getGatewayBot { + function path(): string; + let method: string; + let majorParams: any[]; + function mockResponse({ params }?: {}): any; + } + namespace postCreateMessage { + export function path_1(channel_id: any): string; + export { path_1 as path }; + let method_1: string; + export { method_1 as method }; + let majorParams_1: number[]; + export { majorParams_1 as majorParams }; + export function mockResponse_1({ params, request }?: {}): Promise; + export { mockResponse_1 as mockResponse }; + } + namespace patchEditMessage { + export function path_2(channel_id: any, message_id: any): string; + export { path_2 as path }; + let method_2: string; + export { method_2 as method }; + let majorParams_2: number[]; + export { majorParams_2 as majorParams }; + export function mockResponse_2({ params, request }?: {}): Promise; + export { mockResponse_2 as mockResponse }; + } + namespace putCreateGuildBan { + export function path_3(guild_id: any, user_id: any): string; + export { path_3 as path }; + let method_3: string; + export { method_3 as method }; + export let useHeaders: string[]; + let majorParams_3: number[]; + export { majorParams_3 as majorParams }; + export function mockResponse_3({ params }?: {}): any; + export { mockResponse_3 as mockResponse }; + } + namespace getGuildAuditLog { + export function path_4(guild_id: any): string; + export { path_4 as path }; + let method_4: string; + export { method_4 as method }; + let majorParams_4: number[]; + export { majorParams_4 as majorParams }; + export function mockResponse_4({ params }?: {}): any; + export { mockResponse_4 as mockResponse }; + } + namespace getChannelMessages { + export function path_5(channel_id: any): string; + export { path_5 as path }; + let method_5: string; + export { method_5 as method }; + let majorParams_5: number[]; + export { majorParams_5 as majorParams }; + export function mockResponse_5({ params }?: {}): any; + export { mockResponse_5 as mockResponse }; + } + namespace getChannelMessage { + export function path_6(channel_id: any, message_id: any): string; + export { path_6 as path }; + let method_6: string; + export { method_6 as method }; + let majorParams_6: number[]; + export { majorParams_6 as majorParams }; + export function mockResponse_6({ params }?: {}): any; + export { mockResponse_6 as mockResponse }; + } + namespace getGuildInvites { + export function path_7(guild_id: any): string; + export { path_7 as path }; + let method_7: string; + export { method_7 as method }; + let majorParams_7: number[]; + export { majorParams_7 as majorParams }; + export function mockResponse_7({ params }?: {}): any; + export { mockResponse_7 as mockResponse }; + } + namespace postInteractionResponse { + export function path_8(interaction_id: any, interaction_token: any): string; + export { path_8 as path }; + let method_8: string; + export { method_8 as method }; + let majorParams_8: any[]; + export { majorParams_8 as majorParams }; + export function mockResponse_8({ params }?: {}): any; + export { mockResponse_8 as mockResponse }; + } + namespace patchOriginalInteractionResponse { + export function path_9(interaction_id: any, interaction_token: any): string; + export { path_9 as path }; + let method_9: string; + export { method_9 as method }; + let majorParams_9: number[]; + export { majorParams_9 as majorParams }; + export function mockResponse_9({ params }?: {}): any; + export { mockResponse_9 as mockResponse }; + } + namespace postBulkDeleteMessages { + export function path_10(channel_id: any): string; + export { path_10 as path }; + let method_10: string; + export { method_10 as method }; + let useHeaders_1: string[]; + export { useHeaders_1 as useHeaders }; + let majorParams_10: number[]; + export { majorParams_10 as majorParams }; + export function mockResponse_10({ params }?: {}): any; + export { mockResponse_10 as mockResponse }; + } + namespace postExecuteWebhook { + export function path_11(webhook_id: any, webhook_token: any): string; + export { path_11 as path }; + let method_11: string; + export { method_11 as method }; + let majorParams_11: number[]; + export { majorParams_11 as majorParams }; + export function mockResponse_11({ params }?: {}): any; + export { mockResponse_11 as mockResponse }; + } + namespace getGuildChannels { + export function path_12(guild_id: any): string; + export { path_12 as path }; + let method_12: string; + export { method_12 as method }; + let majorParams_12: number[]; + export { majorParams_12 as majorParams }; + export function mockResponse_12({ params }?: {}): any; + export { mockResponse_12 as mockResponse }; + } + namespace postFollowNewsChannel { + export function path_13(channel_id: any): string; + export { path_13 as path }; + let method_13: string; + export { method_13 as method }; + let majorParams_13: number[]; + export { majorParams_13 as majorParams }; + export function mockResponse_13({ params }?: {}): any; + export { mockResponse_13 as mockResponse }; + } + namespace getSearchGuildMembers { + export function path_14(guild_id: any): string; + export { path_14 as path }; + let method_14: string; + export { method_14 as method }; + let majorParams_14: number[]; + export { majorParams_14 as majorParams }; + export function mockResponse_14({ params }?: {}): any; + export { mockResponse_14 as mockResponse }; + } + namespace getGuildMember { + export function path_15(guild_id: any, user_id: any): string; + export { path_15 as path }; + let method_15: string; + export { method_15 as method }; + let majorParams_15: number[]; + export { majorParams_15 as majorParams }; + export function mockResponse_15({ params }?: {}): any; + export { mockResponse_15 as mockResponse }; + } + namespace patchGuildMember { + export function path_16(guild_id: any, user_id: any): string; + export { path_16 as path }; + let method_16: string; + export { method_16 as method }; + let useHeaders_2: string[]; + export { useHeaders_2 as useHeaders }; + let majorParams_16: number[]; + export { majorParams_16 as majorParams }; + export function mockResponse_16({ params }?: {}): any; + export { mockResponse_16 as mockResponse }; + } + namespace getGuildBan { + export function path_17(guild_id: any, user_id: any): string; + export { path_17 as path }; + let method_17: string; + export { method_17 as method }; + let majorParams_17: number[]; + export { majorParams_17 as majorParams }; + export function mockResponse_17({ params }?: {}): any; + export { mockResponse_17 as mockResponse }; + } + namespace deleteChannelMessage { + export function path_18(channel_id: any, message_id: any): string; + export { path_18 as path }; + let method_18: string; + export { method_18 as method }; + let useHeaders_3: string[]; + export { useHeaders_3 as useHeaders }; + let majorParams_18: number[]; + export { majorParams_18 as majorParams }; + export function mockResponse_18({ params }?: {}): any; + export { mockResponse_18 as mockResponse }; + } + namespace deleteGuildMember { + export function path_19(guild_id: any, user_id: any): string; + export { path_19 as path }; + let method_19: string; + export { method_19 as method }; + let useHeaders_4: string[]; + export { useHeaders_4 as useHeaders }; + let majorParams_19: number[]; + export { majorParams_19 as majorParams }; + export function mockResponse_19({ params }?: {}): any; + export { mockResponse_19 as mockResponse }; + } + namespace deleteRemoveGuildBan { + export function path_20(guild_id: any, user_id: any): string; + export { path_20 as path }; + let method_20: string; + export { method_20 as method }; + let useHeaders_5: string[]; + export { useHeaders_5 as useHeaders }; + let majorParams_20: number[]; + export { majorParams_20 as majorParams }; + export function mockResponse_20({ params }?: {}): any; + export { mockResponse_20 as mockResponse }; + } + namespace putAddGuildMemberRole { + export function path_21(guild_id: any, user_id: any, role_id: any): string; + export { path_21 as path }; + let method_21: string; + export { method_21 as method }; + let useHeaders_6: string[]; + export { useHeaders_6 as useHeaders }; + let majorParams_21: number[]; + export { majorParams_21 as majorParams }; + export function mockResponse_21({ params }?: {}): any; + export { mockResponse_21 as mockResponse }; + } + namespace deleteRemoveMemberRole { + export function path_22(guild_id: any, user_id: any, role_id: any): string; + export { path_22 as path }; + let method_22: string; + export { method_22 as method }; + let useHeaders_7: string[]; + export { useHeaders_7 as useHeaders }; + let majorParams_22: number[]; + export { majorParams_22 as majorParams }; + export function mockResponse_22({ params }?: {}): any; + export { mockResponse_22 as mockResponse }; + } + namespace getUser { + export function path_23(user_id: any): string; + export { path_23 as path }; + let method_23: string; + export { method_23 as method }; + let majorParams_23: any[]; + export { majorParams_23 as majorParams }; + export function mockResponse_23({ params }?: {}): any; + export { mockResponse_23 as mockResponse }; + } + namespace getChannelWebhooks { + export function path_24(channel_id: any): string; + export { path_24 as path }; + let method_24: string; + export { method_24 as method }; + let majorParams_24: number[]; + export { majorParams_24 as majorParams }; + export function mockResponse_24({ params }?: {}): any; + export { mockResponse_24 as mockResponse }; + } + namespace getWebhook { + export function path_25(webhook_id: any): string; + export { path_25 as path }; + let method_25: string; + export { method_25 as method }; + let majorParams_25: any[]; + export { majorParams_25 as majorParams }; + export function mockResponse_25({ params }?: {}): any; + export { mockResponse_25 as mockResponse }; + } + namespace deleteWebhook { + export function path_26(webhook_id: any): string; + export { path_26 as path }; + let method_26: string; + export { method_26 as method }; + let majorParams_26: number[]; + export { majorParams_26 as majorParams }; + export function mockResponse_26({ params }?: {}): any; + export { mockResponse_26 as mockResponse }; + } + namespace postCreateWebhook { + export function path_27(channel_id: any): string; + export { path_27 as path }; + let method_27: string; + export { method_27 as method }; + let majorParams_27: number[]; + export { majorParams_27 as majorParams }; + export function mockResponse_27({ params }?: {}): any; + export { mockResponse_27 as mockResponse }; + } + namespace patchModifyWebhook { + export function path_28(webhook_id: any): string; + export { path_28 as path }; + let method_28: string; + export { method_28 as method }; + let majorParams_28: number[]; + export { majorParams_28 as majorParams }; + export function mockResponse_28({ params }?: {}): any; + export { mockResponse_28 as mockResponse }; + } + namespace deleteLeaveGuild { + export function path_29(guild_id: any): string; + export { path_29 as path }; + let method_29: string; + export { method_29 as method }; + let majorParams_29: number[]; + export { majorParams_29 as majorParams }; + export function mockResponse_29({ params }?: {}): any; + export { mockResponse_29 as mockResponse }; + } + namespace getListGuildScheduledEvents { + export function path_30(guild_id: any): string; + export { path_30 as path }; + let method_30: string; + export { method_30 as method }; + let majorParams_30: number[]; + export { majorParams_30 as majorParams }; + export function mockResponse_30({ params }?: {}): any; + export { mockResponse_30 as mockResponse }; + } + namespace getGuildScheduledEvent { + export function path_31(guild_id: any, scheduled_event_id: any): string; + export { path_31 as path }; + let method_31: string; + export { method_31 as method }; + let majorParams_31: number[]; + export { majorParams_31 as majorParams }; + export function mockResponse_31({ params }?: {}): any; + export { mockResponse_31 as mockResponse }; + } + namespace bulkOverwriteGlobalApplicationCommands { + export function path_32(application_id: any): string; + export { path_32 as path }; + let method_32: string; + export { method_32 as method }; + let majorParams_32: number[]; + export { majorParams_32 as majorParams }; + export function mockResponse_32({ params }?: {}): any; + export { mockResponse_32 as mockResponse }; + } + namespace getRoles { + export function path_33(guild_id: any): string; + export { path_33 as path }; + let method_33: string; + export { method_33 as method }; + let majorParams_33: number[]; + export { majorParams_33 as majorParams }; + export function mockResponse_33({ params }?: {}): any; + export { mockResponse_33 as mockResponse }; + } + namespace getEmoji { + export function path_34(guild_id: any, emoji_id: any): string; + export { path_34 as path }; + let method_34: string; + export { method_34 as method }; + let majorParams_34: number[]; + export { majorParams_34 as majorParams }; + export function mockResponse_34({ params }?: {}): any; + export { mockResponse_34 as mockResponse }; + } + namespace getChannelPins { + export function path_35(channel_id: any): string; + export { path_35 as path }; + let method_35: string; + export { method_35 as method }; + let majorParams_35: number[]; + export { majorParams_35 as majorParams }; + export function mockResponse_35({ params }?: {}): any; + export { mockResponse_35 as mockResponse }; + } + namespace getChannel { + export function path_36(channel_id: any): string; + export { path_36 as path }; + let method_36: string; + export { method_36 as method }; + let majorParams_36: number[]; + export { majorParams_36 as majorParams }; + export function mockResponse_36({ params }?: {}): any; + export { mockResponse_36 as mockResponse }; + } +} +export default _default; +//# sourceMappingURL=endpoints.d.ts.map \ No newline at end of file diff --git a/dist/src/rest/endpoints.d.ts.map b/dist/src/rest/endpoints.d.ts.map new file mode 100644 index 00000000..f84bff82 --- /dev/null +++ b/dist/src/rest/endpoints.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../src/rest/endpoints.js"],"names":[],"mappings":";;QAaU,wBAEL;;;QAGa,4CAWb;;;QAGK,gDAEL;;;;;;QAGa,uEAIb;;;;QAGK,iEAEL;;;;;;QAGa,uEAIb;;;;QAGK,4DAEL;;;;;;;QAIa,qDAEb;;;;QAGK,8CAEL;;;;;;QAGa,qDAEb;;;;QAGK,gDAEL;;;;;;QAGa,qDAEb;;;;QAGK,iEAEL;;;;;;QAGa,qDAEb;;;;QAGK,8CAEL;;;;;;QAGa,qDAEb;;;;QAGK,4EAEL;;;;;;QAGa,qDAEb;;;;QAGK,4EAEL;;;;;;QAGa,qDAEb;;;;QAGK,iDAEL;;;;;;;;QAIa,sDAEb;;;;QAGK,qEAEL;;;;;;QAGa,sDAEb;;;;QAGK,+CAEL;;;;;;QAGa,sDAOb;;;;QAGK,iDAEL;;;;;;QAGa,sDAEb;;;;QAGK,+CAEL;;;;;;QAGa,sDAEb;;;;QAGK,6DAEL;;;;;;QAGa,sDAEb;;;;QAGK,6DAEL;;;;;;;;QAIa,sDAEb;;;;QAGK,6DAEL;;;;;;QAGa,sDAEb;;;;QAGK,kEAEL;;;;;;;;QAIa,sDAEb;;;;QAGK,6DAEL;;;;;;;;QAIa,sDAEb;;;;QAGK,6DAEL;;;;;;;;QAIa,sDAEb;;;;QAGK,2EAEL;;;;;;;;QAIa,sDAEb;;;;QAGK,2EAEL;;;;;;;;QAIa,sDAEb;;;;QAGK,8CAEL;;;;;;QAGa,sDAEb;;;;QAGK,iDAEL;;;;;;QAGa,sDAEb;;;;QAGK,iDAEL;;;;;;QAGa,sDAEb;;;;QAGK,iDAEL;;;;;;QAGa,sDAEb;;;;QAGK,iDAEL;;;;;;QAGa,sDAEb;;;;QAGK,iDAEL;;;;;;QAGa,sDAEb;;;;QAGK,+CAEL;;;;;;QAGa,sDAEb;;;;QAGK,+CAEL;;;;;;QAGa,sDAEb;;;;QAGK,wEAEL;;;;;;QAGa,sDAEb;;;;QAGK,qDAEL;;;;;;QAGa,sDAEb;;;;QAGK,+CAEL;;;;;;QAGa,sDAEb;;;;QAGK,8DAEL;;;;;;QAGa,sDAEb;;;;QAGK,iDAEL;;;;;;QAGa,sDAEb;;;;QAGK,iDAEL;;;;;;QAGa,sDAEb"} \ No newline at end of file diff --git a/dist/src/rest/getBucket.d.ts b/dist/src/rest/getBucket.d.ts new file mode 100644 index 00000000..0c2e729d --- /dev/null +++ b/dist/src/rest/getBucket.d.ts @@ -0,0 +1,3 @@ +export default getBucket; +declare function getBucket(client: any, localRatelimitCache: any, hash: any): Promise; +//# sourceMappingURL=getBucket.d.ts.map \ No newline at end of file diff --git a/dist/src/rest/getBucket.d.ts.map b/dist/src/rest/getBucket.d.ts.map new file mode 100644 index 00000000..58c77bc2 --- /dev/null +++ b/dist/src/rest/getBucket.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getBucket.d.ts","sourceRoot":"","sources":["../../../src/rest/getBucket.js"],"names":[],"mappings":";AAAA,2FAaC"} \ No newline at end of file diff --git a/dist/src/structures.d.ts b/dist/src/structures.d.ts new file mode 100644 index 00000000..66fc268c --- /dev/null +++ b/dist/src/structures.d.ts @@ -0,0 +1,42 @@ +export { default as Attachment } from "./structures/Attachment.js"; +export { default as Invite } from "./structures/Invite.js"; +export { default as Guild } from "./structures/Guild.js"; +export { default as Sticker } from "./structures/Sticker.js"; +export { default as TextChannel } from "./structures/TextChannel.js"; +export { default as Emoji } from "./structures/Emoji.js"; +export { default as AuditLog } from "./structures/AuditLog.js"; +export { default as ModalResponse } from "./structures/ModalResponse.js"; +export { default as OptionSelect } from "./structures/OptionSelect.js"; +export { default as Message } from "./structures/Message.js"; +export { default as User } from "./structures/User.js"; +export { default as Role } from "./structures/Role.js"; +export { default as VoiceChannel } from "./structures/VoiceChannel.js"; +export { default as Thread } from "./structures/Thread.js"; +export { default as PermissionOverwrite } from "./structures/PermissionOverwrite.js"; +export { default as Reaction } from "./structures/Reaction.js"; +export { default as Member } from "./structures/Member.js"; +export { default as Poll } from "./structures/Poll.js"; +export { default as Channel } from "./structures/Channel.js"; +export { default as SlashCommand } from "./structures/SlashCommand.js"; +export { default as Interaction } from "./structures/Interaction.js"; +export { default as VoiceState } from "./structures/VoiceState.js"; +export { default as ScheduledEvent } from "./structures/ScheduledEvent.js"; +export { default as ButtonClick } from "./structures/ButtonClick.js"; +export { default as CategoryChannel } from "./structures/CategoryChannel.js"; +export { default as ChannelMessageManager } from "./managers/ChannelMessageManager.js"; +export { default as UserManager } from "./managers/UserManager.js"; +export { default as BaseCacheManager } from "./managers/BaseCacheManager.js"; +export { default as GuildManager } from "./managers/GuildManager.js"; +export { default as GuildCacheOptions } from "./managers/GuildCacheOptions.js"; +export { default as GluonCacheOptions } from "./managers/GluonCacheOptions.js"; +export { default as MessagePollManager } from "./managers/MessagePollManager.js"; +export { default as GuildEmojisManager } from "./managers/GuildEmojisManager.js"; +export { default as ChannelCacheOptions } from "./managers/ChannelCacheOptions.js"; +export { default as GuildScheduledEventManager } from "./managers/GuildScheduledEventManager.js"; +export { default as MessageReactionManager } from "./managers/MessageReactionManager.js"; +export { default as GuildInviteManager } from "./managers/GuildInviteManager.js"; +export { default as GuildChannelsManager } from "./managers/GuildChannelsManager.js"; +export { default as GuildVoiceStatesManager } from "./managers/GuildVoiceStatesManager.js"; +export { default as GuildMemberManager } from "./managers/GuildMemberManager.js"; +export { default as GuildRoleManager } from "./managers/GuildRoleManager.js"; +//# sourceMappingURL=structures.d.ts.map \ No newline at end of file diff --git a/dist/src/structures.d.ts.map b/dist/src/structures.d.ts.map new file mode 100644 index 00000000..0f99f3a1 --- /dev/null +++ b/dist/src/structures.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"structures.d.ts","sourceRoot":"","sources":["../../src/structures.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/src/structures/Attachment.d.ts b/dist/src/structures/Attachment.d.ts new file mode 100644 index 00000000..ad8c0a38 --- /dev/null +++ b/dist/src/structures/Attachment.d.ts @@ -0,0 +1,68 @@ +export default Attachment; +/** + * Represents an attachment. + * @see {@link https://discord.com/developers/docs/resources/channel#attachment-object-attachment-structure} + */ +declare class Attachment { + /** + * Creates a structure for an attachment. + * @param {Client} client The client instance. + * @param {Object} data Attachment data from Discord. + * @param {Object} options Additional options for the attachment. + * @param {String} options.channelId The ID of the channel that this attachment belongs to. + */ + constructor(client: Client, data: any, { channelId }?: { + channelId: string; + }); + /** + * The id of the attachment. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The name of the file. + * @type {String} + * @readonly + * @public + */ + public readonly get name(): string; + /** + * The size of the file. + * @type {Number} + * @readonly + * @public + */ + public readonly get size(): number; + /** + * The url to the file. + * @type {String} + * @readonly + * @public + */ + public readonly get url(): string; + /** + * The channel that this attachment belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get channelId(): string; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import Client from "../Client.js"; +//# sourceMappingURL=Attachment.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/Attachment.d.ts.map b/dist/src/structures/Attachment.d.ts.map new file mode 100644 index 00000000..9e737f76 --- /dev/null +++ b/dist/src/structures/Attachment.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Attachment.d.ts","sourceRoot":"","sources":["../../../src/structures/Attachment.js"],"names":[],"mappings":";AAIA;;;GAGG;AACH;IAQE;;;;;;OAMG;IACH,oBALW,MAAM,6BAGd;QAAwB,SAAS;KACnC,EAyDA;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,kCAWC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCAoBC;;CACF;mBAxLkB,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/AuditLog.d.ts b/dist/src/structures/AuditLog.d.ts new file mode 100644 index 00000000..71fc7498 --- /dev/null +++ b/dist/src/structures/AuditLog.d.ts @@ -0,0 +1,162 @@ +export default AuditLog; +/** + * Represents an audit log entry. + * @see {@link https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object} + */ +declare class AuditLog { + /** + * Creates a structure for an audit log entry. + * @param {Client} client The client instance. + * @param {Object} data Audit log data from Discord. + * @param {Object} options Additional options for this structure. + * @param {Array?} options.users Resolved users who are involved with the audit log entries. + * @param {String} options.guildId The ID of the guild that this audit log belongs to. + */ + constructor(client: Client, data: any, { users, guildId }?: { + users: Array | null; + guildId: string; + }); + /** + * The id of the audit log entry. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The ID of the guild that this audit log belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get guildId(): string; + /** + * The type of action that occurred. + * @type {Number} + * @readonly + * @public + */ + public readonly get actionType(): number; + /** + * The id of the target user. + * @type {String?} + * @readonly + * @public + */ + public readonly get targetId(): string; + /** + * The channel id involved with this audit log entry. + * @type {String?} + * @readonly + * @public + */ + public readonly get channelId(): string; + /** + * The guild that this audit log belongs to. + * @type {Guild?} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * The channel involved with this audit log entry. + * @type {(TextChannel | VoiceChannel)?} The channel involved with this audit log entry. + * @readonly + * @public + */ + public readonly get channel(): any; + /** + * The target user involved with this audit log entry. + * @type {User?} + * @readonly + * @public + */ + public readonly get target(): User; + /** + * The executor user involved with this audit log entry. + * @type {String?} + * @readonly + * @public + */ + public readonly get executorId(): string; + /** + * The executor user involved with this audit log entry. + * @type {User?} + * @readonly + * @public + */ + public readonly get executor(): User; + /** + * The reason for this audit log entry. + * @type {String?} + * @readonly + * @public + */ + public readonly get reason(): string; + /** + * The count of this type of audit log entry. + * @type {Number?} + * @readonly + * @public + */ + public readonly get count(): number; + /** + * The inactivity period for when members are purged. + * @type {Number?} + * @readonly + * @public + */ + public readonly get deleteMemberDays(): number; + /** + * The number of members removed for when members are purged. + * @type {Number?} + * @readonly + * @public + */ + public readonly get membersRemoved(): number; + /** + * The id of the overwritten entity. + * @type {String?} + * @readonly + * @public + */ + public readonly get specialId(): string; + /** + * The type of the overwritten entity - role ("0") or member ("1") + * @type {Number?} + * @readonly + * @public + */ + public readonly get specialType(): number; + /** + * The new voice channel status. + * @type {String?} + * @readonly + * @public + */ + public readonly get status(): string; + /** + * The changes in this audit log entry. + * @type {Object?} + * @readonly + * @public + */ + public readonly get changes(): any; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import User from "./User.js"; +import Client from "../Client.js"; +//# sourceMappingURL=AuditLog.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/AuditLog.d.ts.map b/dist/src/structures/AuditLog.d.ts.map new file mode 100644 index 00000000..fa7c2e60 --- /dev/null +++ b/dist/src/structures/AuditLog.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"AuditLog.d.ts","sourceRoot":"","sources":["../../../src/structures/AuditLog.js"],"names":[],"mappings":";AAKA;;;GAGG;AACH;IAmBE;;;;;;;OAOG;IACH,oBANW,MAAM,kCAGd;QAAgC,KAAK,EAA7B,KAAK,KAAQ,OAAC;QACE,OAAO;KACjC,EAuJA;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,yCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,yCAEC;IAED;;;;;OAKG;IACH,qCAEC;IAED;;;;;OAKG;IACH,qCAEC;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;OAKG;IACH,+CAEC;IAED;;;;;OAKG;IACH,6CAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,0CAEC;IAED;;;;;OAKG;IACH,qCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCAgCC;;CACF;iBAtagB,WAAW;mBAFT,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/ButtonClick.d.ts b/dist/src/structures/ButtonClick.d.ts new file mode 100644 index 00000000..32e6fed3 --- /dev/null +++ b/dist/src/structures/ButtonClick.d.ts @@ -0,0 +1,40 @@ +export default ButtonClick; +/** + * Represents when a button is clicked. + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-message-component-data-structure} + * @extends {Interaction} + */ +declare class ButtonClick extends Interaction { + /** + * Creates a button click interaction structure. + * @param {Client} client The client instance. + * @param {Object} data The interaction data from Discord. + * @param {Object} options Additional options for this structure. + * @param {String} options.guildId The ID of the guild that this interaction belongs to. + * @param {String} options.channelId The ID of the channel that this interaction belongs to. + */ + constructor(client: Client, data: any, { guildId, channelId }?: { + guildId: string; + channelId: string; + }); + /** + * The custom id of the button. + * @type {String} + * @readonly + * @public + */ + public readonly get customId(): string; + /** + * The message which the button belongs to. + * @type {Message} + * @readonly + * @public + * @see {@link Message} + */ + public readonly get message(): Message; + #private; +} +import Interaction from "./Interaction.js"; +import Message from "./Message.js"; +import Client from "../Client.js"; +//# sourceMappingURL=ButtonClick.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/ButtonClick.d.ts.map b/dist/src/structures/ButtonClick.d.ts.map new file mode 100644 index 00000000..6a7ff9ae --- /dev/null +++ b/dist/src/structures/ButtonClick.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ButtonClick.d.ts","sourceRoot":"","sources":["../../../src/structures/ButtonClick.js"],"names":[],"mappings":";AAMA;;;;GAIG;AACH;IAIE;;;;;;;OAOG;IACH,oBANW,MAAM,sCAGd;QAAwB,OAAO;QACP,SAAS;KACnC,EAoCA;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;;OAMG;IACH,uCAEC;;CA0CF;wBAvHuB,kBAAkB;oBACtB,cAAc;mBAHf,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/CategoryChannel.d.ts b/dist/src/structures/CategoryChannel.d.ts new file mode 100644 index 00000000..feb570ce --- /dev/null +++ b/dist/src/structures/CategoryChannel.d.ts @@ -0,0 +1,110 @@ +export default CategoryChannel; +declare class CategoryChannel { + /** + * Creates the structure for a category channel. + * @param {Client} client The client instance. + * @param {Object} data The raw channel data. + * @param {Object} options The additional options for this structure. + * @param {String} options.guildId The ID of the guild that this channel belongs to. + * @param {Boolean} options.nocache Whether this channel should be cached or not. + */ + constructor(client: Client, data: any, { guildId, nocache }?: { + guildId: string; + nocache: boolean; + }); + /** + * The ID of the channel. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The ID of the guild that this channel belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get guildId(): string; + /** + * The guild that this channel belongs to. + * @type {Guild?} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * The ID of the parent channel. + * @type {String?} + * @readonly + * @public + */ + public readonly get parentId(): string; + /** + * The parent channel. + * @type {Channel?} + * @readonly + * @public + */ + public readonly get parent(): Channel; + /** + * The name of the channel. + * @type {String} + * @readonly + * @public + */ + public readonly get name(): string; + /** + * The type of channel. + * @type {Number} + * @readonly + * @public + */ + public readonly get type(): number; + /** + * The permission overwrites for the channel. + * @type {Array} + * @readonly + * @public + */ + public readonly get permissionOverwrites(): PermissionOverwrite[]; + /** + * Whether the channel is nsfw. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get nsfw(): boolean; + /** + * The mention string of the channel. + * @type {String} + * @readonly + * @public + */ + public readonly get mention(): string; + /** + * The cache options for this channel. + * @type {ChannelCacheOptions} + * @readonly + * @public + */ + public readonly get _cacheOptions(): ChannelCacheOptions; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import Channel from "./Channel.js"; +import PermissionOverwrite from "./PermissionOverwrite.js"; +import Client from "../Client.js"; +//# sourceMappingURL=CategoryChannel.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/CategoryChannel.d.ts.map b/dist/src/structures/CategoryChannel.d.ts.map new file mode 100644 index 00000000..449cbd8a --- /dev/null +++ b/dist/src/structures/CategoryChannel.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CategoryChannel.d.ts","sourceRoot":"","sources":["../../../src/structures/CategoryChannel.js"],"names":[],"mappings":";AAMA;IAUE;;;;;;;OAOG;IACH,oBANW,MAAM,oCAGd;QAAwB,OAAO;QACN,OAAO;KAClC,EAuGA;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,sCAIC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,kEAEC;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,yDAEC;IAED;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCAmBC;;CACF;oBAzRmB,cAAc;gCACF,0BAA0B;mBAHvC,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/Channel.d.ts b/dist/src/structures/Channel.d.ts new file mode 100644 index 00000000..b4e51318 --- /dev/null +++ b/dist/src/structures/Channel.d.ts @@ -0,0 +1,209 @@ +export default Channel; +/** + * Represents a channel within Discord. + * @see {@link https://discord.com/developers/docs/resources/channel} + */ +declare class Channel { + /** + * Returns the mention string for a channel. + * @param {String} channelId The ID of the channel to mention. + * @returns {String} + * @public + * @static + * @method + */ + public static getMention(channelId: string): string; + /** + * Determines whether the channel should be cached. + * @param {GluonCacheOptions} gluonCacheOptions The cache options for the client. + * @param {GuildCacheOptions} guildCacheOptions The cache options for the guild. + * @returns {Boolean} + * @public + * @static + * @method + */ + public static shouldCache(gluonCacheOptions: GluonCacheOptions, guildCacheOptions: GuildCacheOptions): boolean; + /** + * Follows a news channel. + * @param {Client} client The client instance. + * @param {String} channelId The ID of the channel. + * @param {String} followChannelId THe ID of the channel to follow. + * @returns {Promise} + * @public + * @static + * @async + * @method + * @throws {TypeError} + */ + public static follow(client: Client, channelId: string, followChannelId: string): Promise; + /** + * Returns an array of webhooks for the specified channel. + * @param {Client} client The client instance. + * @param {String} channelId The ID of the channel. + * @returns {Promise>} + * @public + * @static + * @async + * @method + */ + public static fetchWebhooks(client: Client, channelId: string): Promise>; + /** + * Creates the base structure for a channel. + * @param {Client} client The client instance. + * @param {Object} data Raw channel data. + * @param {Object} options Additional options for this structure. + * @param {String} options.guildId The ID of the guild that this channel belongs to. + * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-structure} + */ + constructor(client: Client, data: any, { guildId }?: { + guildId: string; + }); + /** + * Sends a message to this channel. + * @param {Object} data Embeds, components and files to include with the message. + * @param {String?} data.content The content of the message. + * @param {Array?} data.embeds The embeds to include with the message. + * @param {Array?} data.components The components to include with the message. + * @param {Array?} data.files The files to include with the message. + * @param {Boolean} data.suppressMentions Whether to suppress mentions in the message. + * @returns {Promise} + * @see {@link https://discord.com/developers/docs/resources/channel#create-message} + * @method + * @public + * @async + * @throws {Error | TypeError} + */ + public send({ content, components, files, embeds, suppressMentions }?: { + content: string | null; + embeds: Array | null; + components: Array | null; + files: Array | null; + suppressMentions: boolean; + }): Promise; + /** + * Returns the mention for this channel. + * @type {String} + * @readonly + * @public + */ + public readonly get mention(): string; + /** + * Whether this channel is marked as NSFW or not. + * @readonly + * @returns {Boolean} + * @public + */ + public readonly get nsfw(): boolean; + /** + * The guild that this channel belongs to. + * @type {Guild?} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * The parent channel. + * @type {Channel?} + * @readonly + * @public + */ + public readonly get parent(): Channel; + /** + * The ID of the channel. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The ID of the guild that this channel belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get guildId(): string; + /** + * The ID of the parent channel. + * @type {String?} + * @readonly + * @public + */ + public readonly get parentId(): string; + /** + * The type of channel. + * @type {Number} + * @readonly + * @public + */ + public readonly get type(): number; + /** + * The name of the channel. + * @type {String?} + * @readonly + * @public + */ + public readonly get name(): string; + /** + * The topic of the channel. + * @type {String?} + * @readonly + * @public + */ + public readonly get topic(): string; + /** + * The permission overwrites for this channel. + * @type {Array} + * @readonly + * @public + */ + public readonly get permissionOverwrites(): any[]; + /** + * The message send cooldown for the channel. + * @type {Number?} + * @readonly + * @public + */ + public readonly get rateLimitPerUser(): number; + /** + * The cache options for this channel. + * @type {ChannelCacheOptions} + * @readonly + * @public + */ + public readonly get _cacheOptions(): ChannelCacheOptions; + /** + * The messages in this channel. + * @type {ChannelMessageManager} + * @readonly + * @public + */ + public readonly get messages(): ChannelMessageManager; + /** + * Returns the permissions for a member in this channel. + * @param {Member} member The member to check the permissions for. + * @returns {String} + */ + checkPermission(member: Member): string; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import Message from "./Message.js"; +import ChannelCacheOptions from "../managers/ChannelCacheOptions.js"; +import ChannelMessageManager from "../managers/ChannelMessageManager.js"; +import Member from "./Member.js"; +import GluonCacheOptions from "../managers/GluonCacheOptions.js"; +import GuildCacheOptions from "../managers/GuildCacheOptions.js"; +import Client from "../Client.js"; +//# sourceMappingURL=Channel.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/Channel.d.ts.map b/dist/src/structures/Channel.d.ts.map new file mode 100644 index 00000000..7c6923b1 --- /dev/null +++ b/dist/src/structures/Channel.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Channel.d.ts","sourceRoot":"","sources":["../../../src/structures/Channel.js"],"names":[],"mappings":";AAcA;;;GAGG;AACH;IA6UE;;;;;;;OAOG;IACH,oDAGC;IAED;;;;;;;;OAQG;IACH,6CAPW,iBAAiB,qBACjB,iBAAiB,WAkB3B;IAED;;;;;;;;;;;OAWG;IACH,6BAVW,MAAM,+CAGJ,OAAO,CAAC,IAAI,CAAC,CAwBzB;IAED;;;;;;;;;OASG;IACH,oCARW,MAAM,sBAEJ,OAAO,CAAC,KAAK,KAAQ,CAAC,CAalC;IApZD;;;;;;;OAOG;IACH,oBANW,MAAM,2BAGd;QAAwB,OAAO;KAC/B,EA6IF;IAED;;;;;;;;;;;;;;OAcG;IACH,uEAZG;QAAsB,OAAO,EAArB,aAAO;QACa,MAAM,EAA1B,KAAK,CAAC,KAAK,CAAC,OAAC;QACmB,UAAU,EAA1C,KAAK,CAAC,iBAAiB,CAAC,OAAC;QACA,KAAK,EAA9B,KAAK,CAAC,UAAU,CAAC,OAAC;QACJ,gBAAgB;KACtC,GAAU,OAAO,CAAC,OAAO,CAAC,CAmB5B;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,sCAIC;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;OAKG;IACH,kDAEC;IAED;;;;;OAKG;IACH,+CAEC;IAED;;;;;OAKG;IACH,yDAEC;IAED;;;;;OAKG;IACH,sDAEC;IAwFD;;;;OAIG;IACH,wBAHW,MAAM,UAuChB;IAED;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCAoCC;;CACF;oBAthBmB,cAAc;gCAFF,oCAAoC;kCAClC,sCAAsC;mBAMrD,aAAa;8BAHF,kCAAkC;8BAClC,kCAAkC;mBAG7C,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/Emoji.d.ts b/dist/src/structures/Emoji.d.ts new file mode 100644 index 00000000..9a722399 --- /dev/null +++ b/dist/src/structures/Emoji.d.ts @@ -0,0 +1,128 @@ +export default Emoji; +/** + * Represents an emoji. + * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure} + */ +declare class Emoji { + /** + * Returns the mention string for an emoji. + * @param {String} name The name of the emoji. + * @param {String?} id The id of the emoji. + * @param {Boolean?} animated Whether the emoji is animated. + * @returns {String} + * @public + * @static + * @method + */ + public static getMention(name: string, id: string | null, animated: boolean | null): string; + /** + * Determines whether the emoji should be cached. + * @param {GluonCacheOptions} gluonCacheOptions The cache options for the client. + * @param {GuildCacheOptions} guildCacheOptions The cache options for the guild. + * @returns {Boolean} + * @public + * @static + * @method + */ + public static shouldCache(gluonCacheOptions: GluonCacheOptions, guildCacheOptions: GuildCacheOptions): boolean; + /** + * Creates the structure for an emoji. + * @param {Client} client The client instance. + * @param {Object} data The raw emoji data from Discord. + * @param {Object} options The options for this emoji. + * @param {String} options.guildId The id of the guild that the emoji belongs to. + * @param {Boolean?} options.nocache Whether this emoji should be cached or not. + */ + constructor(client: Client, data: any, { guildId, nocache }?: { + guildId: string; + nocache: boolean | null; + }); + /** + * Whether the emoji requires colons. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get requireColons(): boolean; + /** + * Whether the emoji is managed. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get managed(): boolean; + /** + * Whether the emoji is animated. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get animated(): boolean; + /** + * Whether the emoji is available. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get available(): boolean; + /** + * The mention string for the emoji. + * @type {String} + * @readonly + * @public + */ + public readonly get mention(): string; + /** + * The url for the emoji. + * @type {String} + * @readonly + * @public + */ + public readonly get url(): string; + /** + * The id of the guild that this emoji belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get guildId(): string; + /** + * The guild that this emoji belongs to. + * @type {Guild?} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * The id of the emoji, if it is custom. + * @type {String?} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The name of the emoji. + * @type {String} + * @readonly + * @public + */ + public readonly get name(): string; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import GluonCacheOptions from "../managers/GluonCacheOptions.js"; +import GuildCacheOptions from "../managers/GuildCacheOptions.js"; +import Client from "../Client.js"; +//# sourceMappingURL=Emoji.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/Emoji.d.ts.map b/dist/src/structures/Emoji.d.ts.map new file mode 100644 index 00000000..73d1a813 --- /dev/null +++ b/dist/src/structures/Emoji.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Emoji.d.ts","sourceRoot":"","sources":["../../../src/structures/Emoji.js"],"names":[],"mappings":";AAMA;;;GAGG;AACH;IA0LE;;;;;;;;;OASG;IACH,2CAPW,aAAO,YACP,cAAQ,UAelB;IAED;;;;;;;;OAQG;IACH,6CAPW,iBAAiB,qBACjB,iBAAiB,WAkB3B;IA9ND;;;;;;;OAOG;IACH,oBANW,MAAM,oCAGd;QAAwB,OAAO;QACL,OAAO,EAAzB,cAAQ;KAClB,EAqEA;IAED;;;;;OAKG;IACH,6CAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,yCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,kCAIC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,mCAEC;IA8CD;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCAsBC;;CACF;8BA5R6B,kCAAkC;8BAClC,kCAAkC;mBAH7C,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/Guild.d.ts b/dist/src/structures/Guild.d.ts new file mode 100644 index 00000000..ab04c14b --- /dev/null +++ b/dist/src/structures/Guild.d.ts @@ -0,0 +1,537 @@ +export default Guild; +/** + * Represents a Discord guild. + * @see {@link https://discord.com/developers/docs/resources/guild} + */ +declare class Guild { + /** + * Deletes a webhook. + * @param {Client} client The client instance. + * @param {String} webhookId The id of the webhook to delete. + * @returns {Promise} + * @public + * @method + * @async + * @throws {TypeError} + * @static + */ + public static deleteWebhook(client: Client, webhookId: string): Promise; + /** + * Creates a webhook in the given channel with the name "Gluon". + * @param {Client} client The client instance. + * @param {String} channelId The id of the channel to create the webhook in. + * @param {Object} options The options for creating the webhook. + * @param {String} options.name The name of the webhook. + * @returns {Promise} + * @public + * @method + * @async + * @throws {TypeError} + * @static + */ + public static createWebhook(client: Client, channelId: string, { name }?: { + name: string; + }): Promise; + /** + * Modified a webhook with the given webhook id. + * @param {Client} client The client instance. + * @param {String} webhookId The id of the webhook to modify. + * @param {Object} options The options to modify the webhook with. + * @param {String} options.channelId The id of the channel the webhook belongs to. + * @returns {Promise} + * @public + * @method + * @async + * @throws {TypeError} + * @static + */ + public static modifyWebhook(client: Client, webhookId: string, { channelId }?: { + channelId: string; + }): Promise; + /** + * Fetches a webhook by the webhook's id. + * @param {Client} client The client instance. + * @param {String} webhookId The id of the webhook to fetch. + * @returns {Promise} + * @public + * @method + * @async + * @throws {TypeError} + * @static + */ + public static fetchWebhook(client: Client, webhookId: string): Promise; + /** + * Posts a webhook with the provided webhook id and token. + * @param {Client} client The client instance. + * @param {Object} referenceData An object with the webhook id and token. + * @param {String?} content The message to send with the webhook. + * @param {Object?} options Embeds, components and files to attach to the webhook. + * @returns {Promise} + * @public + * @method + * @async + * @throws {TypeError} + * @static + */ + public static postWebhook(client: Client, { id, token }: any, content: string | null, { embeds, components, files }?: any | null): Promise; + /** + * Returns the icon URL of the guild. + * @param {String} id The id of the guild. + * @param {String?} hash The hash of the guild icon. + * @returns {String} + * @public + * @static + * @method + */ + public static getIcon(id: string, hash: string | null): string; + /** + * Determines whether the emoji should be cached. + * @param {GluonCacheOptions} gluonCacheOptions The cache options for the client. + * @returns {Boolean} + * @public + * @static + * @method + */ + public static shouldCache(gluonCacheOptions: GluonCacheOptions): boolean; + /** + * Creates the structure for a guild. + * @param {Client} client The client instance. + * @param {Object} data Raw guild data. + * @param {Object?} options The additional options for this structure. + * @param {Boolean?} options.nocache Whether this guild should be cached or not. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object} + */ + constructor(client: Client, data: any, { nocache }?: any | null); + /** + * The id of the guild. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The icon URL of the guild. + * @readonly + * @type {String?} + * @public + */ + public readonly get displayIconURL(): string; + /** + * The owner of the guild. + * @type {Member} + * @readonly + * @public + */ + public readonly get owner(): Member; + /** + * System channel flags. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} + * @readonly + * @type {String[]} + * @public + */ + public readonly get systemChannelFlags(): string[]; + /** + * Raw system channel flags. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} + * @readonly + * @type {Number} + * @public + */ + public readonly get rawSystemChannelFlags(): number; + /** + * Server MFA level. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level} + * @readonly + * @type {String} + * @public + */ + public readonly get mfaLevel(): string; + /** + * Server MFA level. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level} + * @readonly + * @type {Number} + * @public + */ + public readonly get rawMfaLevel(): number; + /** + * Server verification level. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} + * @readonly + * @type {String} + * @public + */ + public readonly get verificationLevel(): string; + /** + * Server verification level. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} + * @readonly + * @type {Number} + * @public + */ + public readonly get rawVerificationLevel(): number; + /** + * Default notification setting. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} + * @readonly + * @type {String} + * @public + */ + public readonly get defaultMessageNotifications(): string; + /** + * Default notification setting. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} + * @readonly + * @type {Number} + * @public + */ + public readonly get rawDefaultMessageNotifications(): number; + /** + * Explicit content filter level. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} + * @readonly + * @type {String} + * @public + */ + public readonly get explicitContentFilter(): string; + /** + * Explicit content filter level. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} + * @readonly + * @type {Number} + * @public + */ + public readonly get rawExplicitContentFilter(): number; + /** + * Server NSFW level. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level} + * @readonly + * @type {String} + * @public + */ + public readonly get nsfwLevel(): string; + /** + * Server NSFW level. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level} + * @readonly + * @type {Number} + * @public + */ + public readonly get rawNsfwLevel(): number; + /** + * Server boost level. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier} + * @readonly + * @type {Number} + * @public + */ + public readonly get premiumTier(): number; + /** + * Whether the guild has the boost progress bar enabled. + * @readonly + * @type {Boolean} + * @public + */ + public readonly get premiumProgressBarEnabled(): boolean; + /** + * Whether the guild is unavailable. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get unavailable(): boolean; + /** + * The name of the guild. + * @type {String} + * @readonly + * @public + */ + public readonly get name(): string; + /** + * The description of the guild. + * @type {String?} + * @readonly + * @public + */ + public readonly get description(): string; + /** + * The icon hash of the guild. + * @type {String} + * @readonly + * @public + */ + public readonly get ownerId(): string; + /** + * The id of the guild owner. + * @type {Number} + * @readonly + * @public + */ + public readonly get joinedAt(): number; + /** + * The member count of the guild. + * @type {Number} + * @readonly + * @public + */ + public readonly get memberCount(): number; + /** + * The system channel id of the guild. + * @type {String?} + * @readonly + * @public + */ + public readonly get systemChannelId(): string; + /** + * The system channel of the guild. + * @type {TextChannel?} + * @readonly + * @public + */ + public readonly get systemChannel(): TextChannel; + /** + * The rules channel id of the guild. + * @type {String?} + * @readonly + * @public + */ + public readonly get rulesChannelId(): string; + /** + * The rules channel of the guild. + * @type {TextChannel?} + * @readonly + * @public + */ + public readonly get rulesChannel(): TextChannel; + /** + * The preferred locale of the guild. + * @type {String} + * @readonly + * @public + */ + public readonly get preferredLocale(): string; + /** + * The premium subscription count of the guild. + * @type {Number} + * @readonly + * @public + */ + public readonly get premiumSubscriptionCount(): number; + /** + * The cache options for this guild. + * @type {GuildCacheOptions} + * @readonly + * @public + */ + public readonly get _cacheOptions(): GuildCacheOptions; + /** + * The members in the guild. + * @type {GuildMemberManager} + * @readonly + * @public + */ + public readonly get members(): GuildMemberManager; + /** + * The channels in the guild. + * @type {GuildChannelsManager} + * @readonly + * @public + */ + public readonly get channels(): GuildChannelsManager; + /** + * The voice states in the guild. + * @type {GuildVoiceStatesManager} + * @readonly + * @public + */ + public readonly get voiceStates(): GuildVoiceStatesManager; + /** + * The roles in the guild. + * @type {GuildRoleManager} + * @readonly + * @public + */ + public readonly get roles(): GuildRoleManager; + /** + * The scheduled events in the guild. + * @type {GuildScheduledEventManager} + * @readonly + * @public + */ + public readonly get scheduledEvents(): GuildScheduledEventManager; + /** + * The emojis in the guild. + * @type {GuildEmojisManager} + * @readonly + * @public + */ + public readonly get emojis(): GuildEmojisManager; + /** + * The invites in the guild. + * @type {GuildInviteManager} + * @readonly + * @public + */ + public readonly get invites(): GuildInviteManager; + /** + * Increases the member count of the guild. + * @method + * @public + */ + public _incrementMemberCount(): void; + /** + * Decreases the member count of the guild. + * @method + * @public + */ + public _decrementMemberCount(): void; + /** + * Returns the client member for this guild. + * @returns {Promise} + * @public + * @async + * @method + * @throws {Error} + */ + public me(): Promise; + /** + * Bans a user with the given id from the guild. + * @param {String} user_id The id of the user to ban. + * @param {Object?} options Ban options. + * @returns {Promise} + * @async + * @public + * @method + * @throws {Error | TypeError} + */ + public ban(user_id: string, { reason, seconds }?: any | null): Promise; + /** + * Unbans a user with the given id from the guild. + * @param {String} user_id The id of the user to unban. + * @param {Object?} options Unban options. + * @returns {Promise} + * @async + * @public + * @method + * @throws {Error | TypeError} + */ + public unban(user_id: string, { reason }?: any | null): Promise; + /** + * Kicks a user with the given id from the guild. + * @param {String} user_id The id of the user to kick. + * @param {Object?} options Kick options. + * @returns {Promise} + * @async + * @public + * @method + * @throws {Error | TypeError} + */ + public kick(user_id: string, { reason }?: any | null): Promise; + /** + * Removes the given role from the given member. + * @param {String} user_id The id of the user. + * @param {String} role_id The id of the role. + * @param {Object?} options Remove role options. + * @returns {Promise} + * @async + * @public + * @method + * @throws {Error | TypeError} + */ + public removeMemberRole(user_id: string, role_id: string, { reason }?: any | null): Promise; + /** + * Fetches audit logs. + * @param {Object?} options Audit log fetch options. + * @returns {Promise} + * @async + * @public + * @method + * @throws {Error | TypeError} + */ + public fetchAuditLogs({ limit, type, user_id, before, after }?: any | null): Promise; + /** + * Fetches the guild invites. + * @returns {Promise} + * @async + * @public + * @method + * @throws {Error} + */ + public fetchInvites(): Promise; + /** + * Fetches all the guild channels. + * @returns {Promise>} + * @async + * @public + * @method + * @throws {Error} + */ + public fetchChannels(): Promise>; + /** + * Fetches the ban for the provided user id. + * @param {String} user_id The id of the user to fetch the ban of. + * @returns {Promise} + * @async + * @public + * @method + * @throws {Error | TypeError} + */ + public fetchBan(user_id: string): Promise; + /** + * Leaves the guild. + * @returns {Promise} + * @async + * @public + * @method + * @throws {Error} + */ + public leave(): Promise; + /** + * Calculates the number of messages that should be cached per channel for this guild. + * @returns {Number} + * @public + * @method + */ + public calculateMessageCacheCount(): number; + /** + * Calculates the number of members that should be cached for this guild. + * @returns {Number} + * @public + * @method + */ + public calculateMemberCacheCount(): number; + /** + * @method + * @public + */ + public _intervalCallback(): void; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import Member from "./Member.js"; +import GuildCacheOptions from "../managers/GuildCacheOptions.js"; +import GuildMemberManager from "../managers/GuildMemberManager.js"; +import GuildChannelsManager from "../managers/GuildChannelsManager.js"; +import GuildVoiceStatesManager from "../managers/GuildVoiceStatesManager.js"; +import GuildRoleManager from "../managers/GuildRoleManager.js"; +import GuildScheduledEventManager from "../managers/GuildScheduledEventManager.js"; +import GuildEmojisManager from "../managers/GuildEmojisManager.js"; +import GuildInviteManager from "../managers/GuildInviteManager.js"; +import AuditLog from "./AuditLog.js"; +import VoiceState from "./VoiceState.js"; +import Client from "../Client.js"; +import GluonCacheOptions from "../managers/GluonCacheOptions.js"; +//# sourceMappingURL=Guild.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/Guild.d.ts.map b/dist/src/structures/Guild.d.ts.map new file mode 100644 index 00000000..a702f220 --- /dev/null +++ b/dist/src/structures/Guild.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Guild.d.ts","sourceRoot":"","sources":["../../../src/structures/Guild.js"],"names":[],"mappings":";AA8BA;;;GAGG;AACH;IA00CE;;;;;;;;;;OAUG;IACH,oCATW,MAAM,sBAEJ,OAAO,CAAC,IAAI,CAAC,CAazB;IAED;;;;;;;;;;;;OAYG;IACH,oCAXW,MAAM,gCAGd;QAAwB,IAAI;KAC5B,GAAU,OAAO,KAAQ,CAoB3B;IAED;;;;;;;;;;;;OAYG;IACH,oCAXW,MAAM,qCAGd;QAAwB,SAAS;KACjC,GAAU,OAAO,KAAQ,CAoB3B;IAED;;;;;;;;;;OAUG;IACH,mCATW,MAAM,sBAEJ,OAAO,KAAQ,CAa3B;IAED;;;;;;;;;;;;OAYG;IACH,kCAXW,MAAM,+BAEN,aAAO,kCACP,UAAO,GACL,OAAO,CAAC,IAAI,CAAC,CA+BzB;IAED;;;;;;;;OAQG;IACH,wCANW,aAAO,UAgBjB;IAgBD;;;;;;;OAOG;IACH,6CANW,iBAAiB,WAa3B;IA1+CD;;;;;;;OAOG;IACH,oBANW,MAAM,2BAEN,UAAO,EA4djB;IAED;;;;;OAKG;IACH,iCAEC;IAiCD;;;;;OAKG;IACH,6CAEC;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;;OAMG;IACH,mDAiBC;IAED;;;;;;OAMG;IACH,oDAWC;IAED;;;;;;OAMG;IACH,uCAIC;IAED;;;;;;OAMG;IACH,0CAIC;IAED;;;;;;OAMG;IACH,gDAOC;IAED;;;;;;OAMG;IACH,mDAOC;IAED;;;;;;OAMG;IACH,0DAKC;IAED;;;;;;OAMG;IACH,6DAIC;IAED;;;;;;OAMG;IACH,oDAOC;IAED;;;;;;OAMG;IACH,uDAKC;IAED;;;;;;OAMG;IACH,wCAOC;IAED;;;;;;OAMG;IACH,2CAMC;IAED;;;;;;OAMG;IACH,0CAMC;IAED;;;;;OAKG;IACH,yDAEC;IAED;;;;;OAKG;IACH,2CAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,0CAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,0CAEC;IAED;;;;;OAKG;IACH,8CAEC;IAED;;;;;OAKG;IACH,iDAIC;IAED;;;;;OAKG;IACH,6CAEC;IAED;;;;;OAKG;IACH,gDAEC;IAED;;;;;OAKG;IACH,8CAEC;IAED;;;;;OAKG;IACH,uDAEC;IAED;;;;;OAKG;IACH,uDAEC;IAED;;;;;OAKG;IACH,kDAEC;IAED;;;;;OAKG;IACH,qDAEC;IAED;;;;;OAKG;IACH,2DAEC;IAED;;;;;OAKG;IACH,8CAEC;IAED;;;;;OAKG;IACH,kEAEC;IAED;;;;;OAKG;IACH,iDAEC;IAED;;;;;OAKG;IACH,kDAEC;IAED;;;;OAIG;IACH,qCAEC;IAED;;;;OAIG;IACH,qCAEC;IAED;;;;;;;OAOG;IACH,aANa,OAAO,CAAC,MAAM,CAAC,CAY3B;IAED;;;;;;;;;OASG;IACH,kDAPW,UAAO,GACL,OAAO,CAAC,IAAI,OAAC,CAAC,CAsC1B;IAED;;;;;;;;;OASG;IACH,2CAPW,UAAO,GACL,OAAO,CAAC,IAAI,OAAC,CAAC,CA8B1B;IAED;;;;;;;;;OASG;IACH,0CAPW,UAAO,GACL,OAAO,CAAC,IAAI,OAAC,CAAC,CA8B1B;IAED;;;;;;;;;;OAUG;IACH,uEAPW,UAAO,GACL,OAAO,CAAC,IAAI,OAAC,CAAC,CAiC1B;IAED;;;;;;;;OAQG;IACH,gEAPW,UAAO,GACL,OAAO,CAAC,QAAQ,EAAE,OAAC,CAAC,CAsEhC;IAED;;;;;;;OAOG;IACH,uBANa,OAAO,CAAC,KAAQ,OAAC,CAAC,CAa9B;IAED;;;;;;;OAOG;IACH,wBANa,OAAO,CAAC,KAAK,CAAC,WAAW,GAAG,UAAU,CAAC,CAAC,CAgBpD;IAED;;;;;;;;OAQG;IACH,kCANa,OAAO,CAAC,UAAO,CAAC,CAgB5B;IAED;;;;;;;OAOG;IACH,gBANa,OAAO,CAAC,IAAI,OAAC,CAAC,CAQ1B;IAED;;;;;OAKG;IACH,4CAUC;IAED;;;;;OAKG;IACH,2CAQC;IA4JD;;;OAGG;IACH,iCAQC;IAmBD;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCAyDC;;CACF;mBAnmDkB,aAAa;8BAIF,kCAAkC;+BAbjC,mCAAmC;iCAHjC,qCAAqC;oCAMlC,wCAAwC;6BAF/C,iCAAiC;uCACvB,2CAA2C;+BAJnD,mCAAmC;+BACnC,mCAAmC;qBAO7C,eAAe;uBAMb,iBAAiB;mBAKrB,cAAc;8BAFH,kCAAkC"} \ No newline at end of file diff --git a/dist/src/structures/Interaction.d.ts b/dist/src/structures/Interaction.d.ts new file mode 100644 index 00000000..8a962428 --- /dev/null +++ b/dist/src/structures/Interaction.d.ts @@ -0,0 +1,128 @@ +export default Interaction; +/** + * Represents an interaction received over the gateway. + * @see {@link https://discord.com/developers/docs/interactions/slash-commands#interaction-object-interaction-structure} + */ +declare class Interaction { + /** + * Creates the structure for an interaction. + * @param {Client} client The client instance. + * @param {Object} data The interaction data from Discord. + */ + constructor(client: Client, data: any); + /** + * The id of the interaction. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The type of interaction. + * @type {Number} + * @readonly + * @public + */ + public readonly get type(): number; + /** + * The id of the guild that this interaction belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get guildId(): string; + /** + * The guild that this interaction belongs to. + * @type {Guild?} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * The id of the channel that this interaction belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get channelId(): string; + /** + * The channel that this interaction belongs to. + * @type {(TextChannel | VoiceChannel | Thread)?} + * @readonly + * @public + */ + public readonly get channel(): any; + /** + * The member that triggered the interaction, if it was run in a guild. + * @type {Member?} + * @readonly + * @public + */ + public readonly get member(): Member; + /** + * Prompts a user to enter text using a modal. + * @param {Object} options Modal options. + * @returns {Promise} + * @public + * @async + * @method + * @throws {Error | TypeError} + */ + public textPrompt({ title, customId, textInputModal }?: any): Promise; + /** + * Responds to autocomplete interactions. + * @param {Object} options Autocompletion options. + * @returns {Promise} + * @public + * @async + * @method + * @throws {Error} + */ + public autocompleteResponse({ choices }?: any): Promise; + /** + * Replies to an interaction. + * @param {String?} content The message content to send in the response to the interaction. + * @param {Object?} options An embed, components, and whether the response should be as an ephemeral message. + * @returns {Promise} + * @public + * @async + * @method + */ + public reply(content: string | null, { files, embeds, components, quiet }?: any | null): Promise; + /** + * Edits a response to an interaction. Works up to 15 minutes after the response was sent. + * @param {String?} content The new interaction response content. + * @param {Object?} options The new interaction response options. + * @returns {Promise} + * @public + * @async + * @method + * @throws {Error | TypeError} + */ + public edit(content: string | null, { files, embeds, components }?: any | null): Promise; + /** + * Silently acknowledges an interaction. + * @returns {Promise} + * @public + * @async + * @method + */ + public acknowledge(): Promise; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import Member from "./Member.js"; +import Client from "../Client.js"; +//# sourceMappingURL=Interaction.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/Interaction.d.ts.map b/dist/src/structures/Interaction.d.ts.map new file mode 100644 index 00000000..b63082d9 --- /dev/null +++ b/dist/src/structures/Interaction.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Interaction.d.ts","sourceRoot":"","sources":["../../../src/structures/Interaction.js"],"names":[],"mappings":";AAQA;;;GAGG;AACH;IAQE;;;;OAIG;IACH,oBAHW,MAAM,aA8DhB;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,qCAEC;IAED;;;;;;;;OAQG;IACH,8DANa,OAAO,CAAC,IAAI,CAAC,CAmCzB;IAED;;;;;;;;OAQG;IACH,gDANa,OAAO,CAAC,WAAW,CAAC,CAsBhC;IAED;;;;;;;;OAQG;IACH,sBAPW,aAAO,yCACP,UAAO,GACL,OAAO,CAAC,WAAW,CAAC,CAoChC;IAED;;;;;;;;;OASG;IACH,qBARW,aAAO,kCACP,UAAO,GACL,OAAO,CAAC,WAAW,CAAC,CAwBhC;IAED;;;;;;OAMG;IACH,sBALa,OAAO,CAAC,WAAW,CAAC,CAiBhC;IAED;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCAgBC;;CACF;mBAnWkB,aAAa;mBAKb,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/Invite.d.ts b/dist/src/structures/Invite.d.ts new file mode 100644 index 00000000..79974f8b --- /dev/null +++ b/dist/src/structures/Invite.d.ts @@ -0,0 +1,134 @@ +export default Invite; +/** + * Represents a guild invite. + */ +declare class Invite { + /** + * Returns the URL of the invite. + * @param {String} code The code of the invite. + * @returns {String} + * @public + * @static + * @method + */ + public static getUrl(code: string): string; + /** + * Determines whether the invite should be cached. + * @param {GluonCacheOptions} gluonCacheOptions The cache options for the client. + * @param {GuildCacheOptions} guildCacheOptions The cache options for the guild. + * @returns {Boolean} + * @public + * @static + * @method + */ + public static shouldCache(gluonCacheOptions: GluonCacheOptions, guildCacheOptions: GuildCacheOptions): boolean; + /** + * Creates the structure for an invite. + * @param {Client} client The client instance. + * @param {Object} data The raw invite data from Discord. + * @param {Object} options Additional options for this structure. + * @param {String} options.guildId The id of the guild that the invite belongs to. + * @param {Boolean?} options.nocache Whether this invite should be cached or not. + * @see {@link https://discord.com/developers/docs/resources/invite#invite-object-invite-structure} + */ + constructor(client: Client, data: any, { guildId, nocache }?: { + guildId: string; + nocache: boolean | null; + }); + /** + * The id of the channel the invite is directed to. + * @type {String} + * @readonly + * @public + */ + public readonly get channelId(): string; + /** + * The channel the invite is directed to. + * @type {(TextChannel | VoiceChannel)?} + * @readonly + * @public + */ + public readonly get channel(): any; + /** + * The code of the invite. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The code of the invite. + * @type {String} + * @readonly + * @public + */ + public readonly get code(): string; + /** + * The id of the guild that this invite belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get guildId(): string; + /** + * The guild that this role belongs to. + * @type {Guild?} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * The number of times the invite has been used. + * @type {Number?} + * @readonly + * @public + */ + public readonly get uses(): number; + /** + * The UNIX timestamp of when the invite expires. + * @type {Number?} + * @readonly + * @public + */ + public readonly get expires(): number; + /** + * The user who created the invite. + * @type {User?} + * @readonly + * @public + */ + public readonly get inviter(): User; + /** + * The URL of the invite. + * @type {String} + * @readonly + * @public + */ + public readonly get url(): string; + /** + * The maximum number of uses allowed for the invite. + * @type {Number?} + * @readonly + * @public + */ + public readonly get maxUses(): number; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import User from "./User.js"; +import GluonCacheOptions from "../managers/GluonCacheOptions.js"; +import GuildCacheOptions from "../managers/GuildCacheOptions.js"; +import Client from "../Client.js"; +//# sourceMappingURL=Invite.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/Invite.d.ts.map b/dist/src/structures/Invite.d.ts.map new file mode 100644 index 00000000..b6e27f5c --- /dev/null +++ b/dist/src/structures/Invite.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Invite.d.ts","sourceRoot":"","sources":["../../../src/structures/Invite.js"],"names":[],"mappings":";AAOA;;GAEG;AACH;IA2NE;;;;;;;OAOG;IACH,2CAIC;IAED;;;;;;;;OAQG;IACH,6CAPW,iBAAiB,qBACjB,iBAAiB,WAkB3B;IArPD;;;;;;;;OAQG;IACH,oBAPW,MAAM,oCAGd;QAAwB,OAAO;QACL,OAAO,EAAzB,cAAQ;KAChB,EA2FF;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;OAKG;IACH,kCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAuCD;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCA2BC;;CACF;iBAzTgB,WAAW;8BAFE,kCAAkC;8BAClC,kCAAkC;mBAH7C,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/Member.d.ts b/dist/src/structures/Member.d.ts new file mode 100644 index 00000000..c19c51cb --- /dev/null +++ b/dist/src/structures/Member.d.ts @@ -0,0 +1,307 @@ +export default Member; +/** + * Represents a guild member. + * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure} + */ +declare class Member { + /** + * Returns the mention string for the member. + * @param {String} userId The id of the user to mention. + * @returns {String} + * @public + * @static + * @method + */ + public static getMention(userId: string): string; + /** + * Returns the avatar url for the member. + * @param {String} id The id of the user. + * @param {String} guild_id The id of the guild the user belongs to. + * @param {String?} hash The avatar hash of the user. + * @returns {String} + * @public + * @static + * @method + */ + public static getAvatarUrl(id: string, guildId: any, hash: string | null): string; + /** + * Determines whether the member should be cached. + * @param {GluonCacheOptions} gluonCacheOptions The cache options for the client. + * @param {GuildCacheOptions} guildCacheOptions The cache options for the guild. + * @returns {Boolean} + * @public + * @static + * @method + */ + public static shouldCache(gluonCacheOptions: GluonCacheOptions, guildCacheOptions: GuildCacheOptions): boolean; + /** + * Returns the hash name for the message. + * @param {String} guildId The id of the guild that the message belongs to. + * @param {String} memberId The id of the member. + * @returns {String} + */ + static getHashName(guildId: string, memberId: string): string; + /** + * Decrypts a member. + * @param {Client} client The client instance. + * @param {String} data The encrypted message data. + * @param {String} guildId The id of the guild that the message belongs to. + * @param {String} userId The id of the member. + * @returns {Member} + */ + static decrypt(client: Client, data: string, guildId: string, userId: string): Member; + /** + * Adds a role to a member. + * @param {Client} client The client instance. + * @param {String} guildId The guild id the member belongs to. + * @param {String} userId The id of the member who the action is occuring on. + * @param {String} roleId The id of the role to add. + * @param {Object} options The options for adding the role. + * @param {String} options.reason The reason for adding the role. + * @returns {Promise} + * @public + * @method + * @async + * @throws {TypeError} + */ + public static addRole(client: Client, guildId: string, userId: string, roleId: string, { reason }?: { + reason: string; + }): Promise; + /** + * Removes a role from a member. + * @param {Client} client The client instance. + * @param {String} guildId The guild id the member belongs to. + * @param {String} userId The id of the member who the action is occuring on. + * @param {String} roleId The id of the role to remove. + * @param {Object} options The options for removing the role. + * @param {String} options.reason The reason for removing the role. + * @returns {Promise} + * @public + * @method + * @async + * @throws {TypeError} + */ + public static removeRole(client: Client, guildId: string, userId: string, roleId: string, { reason }?: { + reason: string; + }): Promise; + /** + * Creates the structure for a guild member. + * @param {Client} client The client instance. + * @param {Object} data The raw member data from Discord. + * @param {Object} options Additional options for the member. + * @param {String} options.userId The id of the member. + * @param {String} options.guildId The id of the guild that the member belongs to. + * @param {User?} options.user A user object for this member. + * @param {Boolean?} options.nocache Whether this member should be cached. + */ + constructor(client: Client, data: any, { userId, guildId, user, nocache }?: { + userId: string; + guildId: string; + user: User | null; + nocache: boolean | null; + }); + /** + * The id of the member. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The id of the guild that this member belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get guildId(): string; + /** + * The guild that this member belongs to. + * @type {Guild?} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * The nickname of the member. + * @type {String?} + * @readonly + * @public + */ + public readonly get nick(): string; + /** + * The UNIX timestamp for when this member joined the guild. + * @type {Number?} + * @readonly + * @public + */ + public readonly get joinedAt(): number; + /** + * The UNIX timestamp for when this member's timeout expires, if applicable. + * @type {Number?} + * @readonly + * @public + */ + public readonly get timeoutUntil(): number; + /** + * The flags for this user. + * @type {Number} + * @readonly + * @public + */ + public readonly get flags(): number; + /** + * The member's roles. + * @readonly + * @type {Array} + * @public + */ + public readonly get roles(): Role[]; + /** + * The position of the member's highest role. + * @readonly + * @type {Number} + * @public + */ + public readonly get highestRolePosition(): number; + /** + * The overall calculated permissions for this member. + * @readonly + * @type {BigInt} + * @public + */ + public readonly get permissions(): BigInt; + /** + * Whether the member has joined the guild before. + * @readonly + * @type {Boolean} + * @public + */ + public readonly get rejoined(): boolean; + /** + * The user object for this member. + * @type {User} + * @readonly + * @public + */ + public readonly get user(): User; + /** + * The url of the member's avatar. + * @readonly + * @type {String} + * @public + */ + public readonly get displayAvatarURL(): string; + /** + * Whether the user has not yet passed the guild's membership screening requirements. + * @readonly + * @type {Boolean} + * @public + */ + public readonly get pending(): boolean; + /** + * Whether the user has an animated avatar or not. + * @readonly + * @type {Boolean} + * @public + */ + public readonly get avatarIsAnimated(): boolean; + /** + * The mention string for the member. + * @type {String} + * @readonly + * @public + */ + public readonly get mention(): string; + /** + * The hash name for the member. + * @type {String} + * @readonly + * @public + */ + public readonly get hashName(): string; + /** + * Adds a role to the member. + * @param {String} role_id The id of the role to add to the member. + * @param {Object?} options The options for adding the role to the member. + * @param {String?} options.reason The reason for adding the role to the member. + * @returns {Promise} + * @public + * @async + * @method + * @throws {TypeError | Error} + */ + public addRole(role_id: string, { reason }?: any | null): Promise; + /** + * Removes a role from the member. + * @param {String} role_id The id of the role to remove from the member. + * @param {Object?} options The options for removing the role from the member. + * @param {String?} options.reason The reason for removing the role from the member. + * @returns {Promise} + * @public + * @async + * @method + * @throws {TypeError | Error} + */ + public removeRole(role_id: string, { reason }?: any | null): Promise; + /** + * Adds a timeout to the member. + * @param {Number} timeout_until The UNIX timestamp for when the member's timeout should end. + * @param {Object?} options The options for timing out the member. + * @param {String?} options.reason The reason for timing out the member. + * @returns {Promise} + * @public + * @async + * @method + * @throws {TypeError | Error} + */ + public timeoutAdd(timeout_until: number, { reason }?: any | null): Promise; + /** + * Removes a timeout from the member. + * @param {Object?} options The options for untiming out the member. + * @param {String?} options.reason The reason for removing the time out from the member. + * @returns {Promise} + * @public + * @async + * @method + * @throws {TypeError | Error} + */ + public timeoutRemove({ reason }?: any | null): Promise; + /** + * Updates the member's roles. + * @param {Array} roles An array of role ids for the roles the member should be updated with. + * @param {Object?} options The options for updating the member's roles. + * @returns {Promise} + * @public + * @async + * @method + * @throws {TypeError | Error} + */ + public massUpdateRoles(roles: Array, { reason }?: any | null): Promise; + /** + * Encrypts the member. + * @returns {String} + * @public + * @method + */ + public encrypt(): string; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import Role from "./Role.js"; +import User from "./User.js"; +import GluonCacheOptions from "../managers/GluonCacheOptions.js"; +import GuildCacheOptions from "../managers/GuildCacheOptions.js"; +import Client from "../Client.js"; +//# sourceMappingURL=Member.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/Member.d.ts.map b/dist/src/structures/Member.d.ts.map new file mode 100644 index 00000000..18af18aa --- /dev/null +++ b/dist/src/structures/Member.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Member.d.ts","sourceRoot":"","sources":["../../../src/structures/Member.js"],"names":[],"mappings":";AAmBA;;;GAGG;AACH;IAoZE;;;;;;;OAOG;IACH,iDAIC;IAED;;;;;;;;;OASG;IACH,2DANW,aAAO,UAkBjB;IAuJD;;;;;;;;OAQG;IACH,6CAPW,iBAAiB,qBACjB,iBAAiB,WAkB3B;IAED;;;;;OAKG;IACH,8DAMC;IAED;;;;;;;OAOG;IACH,uBANW,MAAM,kDAIJ,MAAM,CAelB;IAED;;;;;;;;;;;;;OAaG;IACH,8BAZW,MAAM,gEAKd;QAAwB,MAAM;KAC9B,GAAU,OAAO,CAAC,IAAI,CAAC,CAiCzB;IAED;;;;;;;;;;;;;OAaG;IACH,iCAZW,MAAM,gEAKd;QAAwB,MAAM;KAC9B,GAAU,OAAO,CAAC,IAAI,CAAC,CAiCzB;IAntBD;;;;;;;;;OASG;IACH,oBARW,MAAM,kDAGd;QAAwB,MAAM;QACN,OAAO;QACR,IAAI,EAAnB,IAAI,OAAC;QACa,OAAO,EAAzB,cAAQ;KAClB,EAmJA;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,2CAEC;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;OAKG;IACH,oCAsBC;IAED;;;;;OAKG;IACH,kDAUC;IAED;;;;;OAKG;IACH,0CAIC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,iCAEC;IAiCD;;;;;OAKG;IACH,+CAKC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,gDAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAwCD;;;;;;;;;;OAUG;IACH,6CARW,UAAO,GAEL,OAAO,CAAC,IAAI,CAAC,CAUzB;IAED;;;;;;;;;;OAUG;IACH,gDARW,UAAO,GAEL,OAAO,CAAC,IAAI,CAAC,CAUzB;IAED;;;;;;;;;;OAUG;IACH,sDARW,UAAO,GAEL,OAAO,CAAC,IAAI,CAAC,CAgCzB;IAED;;;;;;;;;OASG;IACH,kCARW,UAAO,GAEL,OAAO,CAAC,IAAI,CAAC,CA6BzB;IAED;;;;;;;;;OASG;IACH,8BARW,KAAK,QAAQ,eACb,UAAO,GACL,OAAO,CAAC,IAAI,CAAC,CAmCzB;IAoJD;;;;;OAKG;IACH,yBAEC;IAED;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCA6CC;;CACF;iBA5zBgB,WAAW;iBALX,WAAW;8BAGE,kCAAkC;8BAClC,kCAAkC;mBAM7C,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/Message.d.ts b/dist/src/structures/Message.d.ts new file mode 100644 index 00000000..ae90a136 --- /dev/null +++ b/dist/src/structures/Message.d.ts @@ -0,0 +1,435 @@ +export default Message; +/** + * A message belonging to a channel within a guild. + */ +declare class Message { + /** + * The URL of the message. + * @param {String} guildId The id of the guild that the message belongs to. + * @param {String} channelId The id of the channel that the message belongs to. + * @param {String} messageId The id of the message. + * @returns {String} + * @public + * @static + * @method + */ + public static getUrl(guildId: string, channelId: string, messageId: string): string; + /** + * Determines whether the message should be cached. + * @param {GluonCacheOptions} gluonCacheOptions The cache options for the client. + * @param {GuildCacheOptions} guildCacheOptions The cache options for the guild. + * @param {ChannelCacheOptions} channelCacheOptions The cache options for the channel. + * @returns {Boolean} + * @public + * @static + * @method + */ + public static shouldCache(gluonCacheOptions: GluonCacheOptions, guildCacheOptions: GuildCacheOptions, channelCacheOptions: ChannelCacheOptions): boolean; + /** + * Posts a message to the specified channel. + * @param {Client} client The client instance. + * @param {String} channelId The id of the channel to send the message to. + * @param {String} guildId The id of the guild which the channel belongs to. + * @param {Object?} options Content, embeds, components and files to attach to the message. + * @param {String?} options.content The message content. + * @param {Embed[]} options.embeds Array of embeds to send with the message. + * @param {MessageComponents?} options.components Message components to send with the message. + * @param {Array?} options.files Array of file objects for files to send with the message. + * @param {Boolean?} options.suppressMentions Whether to suppress mentions in the message. + * @returns {Promise} + * @public + * @method + * @async + * @throws {TypeError} + */ + public static send(client: Client, channelId: string, guildId: string, { content, embeds, components, files, reference, suppressMentions, }?: any | null): Promise; + /** + * Edits a message. + * @param {Client} client The client instance. + * @param {String} channelId The id of the channel the message belongs to. + * @param {String} messageId The id of the message. + * @param {String} guildId The id of the guild the message belongs to. + * @param {Object?} options The message options. + * @param {String?} options.content The message content. + * @param {Embed[]?} options.embeds Array of embeds to send with the message. + * @param {MessageComponents?} options.components Message components to send with the message. + * @param {Array?} options.files Array of file objects for files to send with the message. + * @param {Array?} options.attachments Array of attachment objects for existing attachments sent with the message. + * @returns {Promise} + */ + static edit(client: Client, channelId: string, messageId: string, guildId: string, { content, embeds, components, attachments, files }?: any | null): Promise; + /** + * Returns the hash name for the message. + * @param {String} guildId The id of the guild that the message belongs to. + * @param {String} channelId The id of the channel that the message belongs to. + * @param {String} messageId The id of the message. + * @returns {String} + * @public + * @static + * @method + * @throws {TypeError} + */ + public static getHashName(guildId: string, channelId: string, messageId: string): string; + /** + * Decrypts a message. + * @param {Client} client The client instance. + * @param {String} data The encrypted message data. + * @param {String} guildId The id of the guild that the message belongs to. + * @param {String} channelId The id of the channel that the message belongs to. + * @param {String} messageId The id of the message. + * @returns {Message} + * @public + * @static + * @method + * @throws {TypeError} + */ + public static decrypt(client: Client, data: string, guildId: string, channelId: string, messageId: string): Message; + /** + * Validates the message content, embeds, components and files. + * @param {Object} options The message options. + * @param {String} options.content The message content. + * @param {Embed[]} options.embeds Array of embeds to send with the message. + * @param {MessageComponents} options.components Message components to send with the message. + * @param {Array} options.files Array of file objects for files to send with the message. + * @param {Array} options.attachments Array of attachment objects for existing attachments sent with the message. + * @param {Number} options.flags The message flags. + * @param {Object} options.reference The message reference. + * @param {String} options.reference.message_id The id of the message to reference. + * @param {String} options.reference.channel_id The id of the channel to reference. + * @param {String} options.reference.guild_id The id of the guild to reference. + * @returns {void} + * @throws {Error | TypeError | RangeError} + * @public + * @static + * @method + */ + public static sendValidation({ content, embeds, components, files, attachments, flags, reference, }?: { + content: string; + embeds: Embed[]; + components: MessageComponents; + files: Array; + attachments: Array; + flags: number; + reference: { + message_id: string; + channel_id: string; + guild_id: string; + }; + }): void; + /** + * Deletes one message. + * @param {Client} client The client instance. + * @param {String} channelId The id of the channel that the message belongs to. + * @param {String} messageId The id of the message to delete. + * @param {Object?} options + * @param {String?} options.reason The reason for deleting the message. + * @returns {Promise} + * @public + * @method + * @async + * @throws {TypeError} + */ + public static delete(client: Client, channelId: string, messageId: string, { reason }?: any | null): Promise; + /** + * Creates the structure for a message. + * @param {Client} client The client instance. + * @param {Object} data Message data returned from Discord. + * @param {Object} options Additional options for this structure. + * @param {String} options.channelId The id of the channel that the message belongs to. + * @param {String} options.guildId The id of the guild that the channel belongs to. + * @param {Boolean?} options.nocache Whether this message should be cached or not. + * @param {Boolean?} options.ignoreExisting Whether to ignore existing messages in the cache. + * @see {@link https://discord.com/developers/docs/resources/channel#message-object} + */ + constructor(client: Client, data: any, { channelId, guildId, nocache, ignoreExisting }?: { + channelId: string; + guildId: string; + nocache: boolean | null; + ignoreExisting: boolean | null; + }); + /** + * The timestamp for when this message was last edited. + * @type {Number?} + * @readonly + * @public + */ + public readonly get editedTimestamp(): number; + /** + * The user who sent the message. + * @type {User} + * @readonly + * @public + */ + public readonly get author(): User; + /** + * The id of the user who sent the message. + * @type {String} + * @readonly + * @public + */ + public readonly get authorId(): string; + /** + * The member who sent the message. + * @type {Member?} + * @readonly + * @public + */ + public readonly get member(): Member; + /** + * Whether this message includes user mentions. + * @readonly + * @type {Boolean} + * @public + */ + public readonly get mentions(): boolean; + /** + * Whether this message includes role mentions. + * @readonly + * @type {Boolean} + * @public + */ + public readonly get mentionRoles(): boolean; + /** + * Whether this message mentions everyone. + * @readonly + * @type {Boolean} + * @public + */ + public readonly get mentionEveryone(): boolean; + /** + * Whether this message has been pinned. + * @readonly + * @type {Boolean} + * @public + */ + public readonly get pinned(): boolean; + /** + * Whether another message has replaced this original message. + * @readonly + * @type {Boolean} + * @public + */ + public readonly get mirrored(): boolean; + /** + * The UNIX (seconds) timestamp for when this message was created. + * @readonly + * @type {Number} + * @public + */ + public readonly get timestamp(): number; + /** + * The guild that this message belongs to. + * @type {Guild?} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * The guild that this message belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get guildId(): string; + /** + * The channel that this message belongs to. + * @type {Channel?} + * @readonly + * @public + */ + public readonly get channel(): Channel; + /** + * The channel that this message belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get channelId(): string; + /** + * The id of the message. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The message attachments. + * @type {Attachment[]} + * @readonly + * @public + */ + public readonly get attachments(): Attachment[]; + /** + * The message content. + * @type {String?} + * @readonly + * @public + */ + public readonly get content(): string; + /** + * The message poll. + * @type {Poll?} + * @readonly + * @public + */ + public readonly get poll(): Poll; + /** + * The message reactions. + * @type {MessageReactionManager} + * @readonly + * @public + */ + public readonly get reactions(): MessageReactionManager; + /** + * The message embeds. + * @type {Array} + * @readonly + * @public + */ + public readonly get embeds(): Embed[]; + /** + * The message that this message references. + * @type {Object} + * @readonly + * @public + */ + public readonly get reference(): any; + /** + * The flags of the message. + * @type {String[]} + * @readonly + * @public + * @see {@link https://discord.com/developers/docs/resources/message#message-object-message-flags} + */ + public readonly get flags(): string[]; + /** + * The raw flags of the message. + * @type {Number} + * @readonly + * @public + */ + public readonly get flagsRaw(): number; + /** + * The type of message. + * @type {Number} + * @readonly + * @public + */ + public readonly get type(): number; + /** + * The id of the webhook this message is from. + * @type {String?} + * @readonly + * @public + */ + public readonly get webhookId(): string; + /** + * Stickers sent with this message. + * @type {Sticker[]} + * @readonly + * @public + */ + public readonly get stickerItems(): Sticker[]; + /** + * The snapshot data about the message. + * @type {Object?} + * @readonly + * @public + */ + public readonly get messageSnapshots(): any; + /** + * The URL of the message. + * @type {String} + * @readonly + * @public + */ + public readonly get url(): string; + /** + * The hash name for the message. + * @type {String} + * @readonly + * @public + */ + public readonly get hashName(): string; + /** + * Replies to the message. + * @param {Object?} options Embeds, components and files to attach to the message. + * @param {String?} options.content The message content. + * @param {Embed?} options.embed Embed to send with the message. + * @param {MessageComponents?} options.components Message components to send with the message. + * @param {Array?} options.files Array of file objects for files to send with the message. + * @returns {Promise} + * @see {@link https://discord.com/developers/docs/resources/channel#create-message} + * @method + * @public + * @async + * @throws {Error | TypeError} + */ + public reply({ content, embeds, components, files, suppressMentions }?: any | null): Promise; + /** + * Edits the message, assuming it is sent by the client user. + * @param {Object?} options Content, embeds and components to attach to the message. + * @param {String?} options.content The message content. + * @param {Embed?} options.embed Embed to send with the message. + * @param {MessageComponents?} options.components Message components to send with the message. + * @param {Array?} options.attachments Array of attachment objects for files to send with the message. + * @param {Number?} options.flags The message flags. + * @param {Object?} options.reference The message reference. + * @param {String?} options.reference.message_id The id of the message to reference. + * @param {String?} options.reference.channel_id The id of the channel to reference. + * @param {String?} options.reference.guild_id The id of the guild to reference. + * @param {FileUpload[]?} options.files Array of file objects for files to send with the message. + * @returns {Promise} + * @see {@link https://discord.com/developers/docs/resources/channel#edit-message} + * @method + * @public + * @async + * @throws {Error | TypeError} + */ + public edit({ components, files, content, embeds, attachments, flags, reference, }?: any | null): Promise; + /** + * Deletes the message. + * @param {Object?} options The options for deleting the message. + * @param {String?} options.reason The reason for deleting the message + * @returns {Promise} + * @method + * @public + * @async + */ + public delete({ reason }?: any | null): Promise; + /** + * Encrypts the message. + * @returns {String} + * @public + * @method + */ + public encrypt(): string; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import User from "./User.js"; +import Member from "./Member.js"; +import Attachment from "./Attachment.js"; +import Poll from "./Poll.js"; +import MessageReactionManager from "../managers/MessageReactionManager.js"; +import Embed from "../util/builder/embedBuilder.js"; +import Sticker from "./Sticker.js"; +import GluonCacheOptions from "../managers/GluonCacheOptions.js"; +import GuildCacheOptions from "../managers/GuildCacheOptions.js"; +import ChannelCacheOptions from "../managers/ChannelCacheOptions.js"; +import Client from "../Client.js"; +import MessageComponents from "../util/builder/messageComponents.js"; +import FileUpload from "../util/builder/fileUpload.js"; +//# sourceMappingURL=Message.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/Message.d.ts.map b/dist/src/structures/Message.d.ts.map new file mode 100644 index 00000000..b79ae663 --- /dev/null +++ b/dist/src/structures/Message.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/structures/Message.js"],"names":[],"mappings":";AA6BA;;GAEG;AACH;IA4qBE;;;;;;;;;OASG;IACH,oFAQC;IAkGD;;;;;;;;;OASG;IACH,6CARW,iBAAiB,qBACjB,iBAAiB,uBACjB,mBAAmB,WA2B7B;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,2BAfW,MAAM,6GAGN,UAAO,GAML,OAAO,CAAC,OAAO,CAAC,CAoE5B;IAED;;;;;;;;;;;;;OAaG;IACH,oBAZW,MAAM,+GAIN,UAAO,GAML,OAAO,CAAC,OAAO,CAAC,CAkD5B;IAED;;;;;;;;;;OAUG;IACH,yFAQC;IAED;;;;;;;;;;;;OAYG;IACH,8BAXW,MAAM,wEAKJ,OAAO,CAsBnB;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,sGAhBG;QAAwB,OAAO;QACN,MAAM,EAAvB,KAAK,EAAE;QACoB,UAAU,EAArC,iBAAiB;QACU,KAAK,EAAhC,KAAK,CAAC,UAAU,CAAC;QACU,WAAW,EAAtC,KAAK,CAAC,UAAU,CAAC;QACD,KAAK;QACL,SAAS,EACjC;YAAkC,UAAU;YACV,UAAU;YACV,QAAQ;SAC1C;KAAA,GAAU,IAAI,CA+EhB;IAED;;;;;;;;;;;;OAYG;IACH,6BAXW,MAAM,qDAGN,UAAO,GAEL,OAAO,CAAC,IAAI,CAAC,CAyBzB;IAhnCD;;;;;;;;;;OAUG;IACH,oBATW,MAAM,+DAGd;QAAwB,SAAS;QACT,OAAO;QACL,OAAO,EAAzB,cAAQ;QACU,cAAc,EAAhC,cAAQ;KAChB,EA6TF;IAED;;;;;OAKG;IACH,8CAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,qCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,4CAEC;IAED;;;;;OAKG;IACH,+CAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,gDAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,wDAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,qCAMC;IAED;;;;;;OAMG;IACH,sCA2CC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,8CAEC;IAED;;;;;OAKG;IACH,4CAEC;IAED;;;;;OAKG;IACH,kCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAsBD;;;;;;;;;;;;;OAaG;IACH,wEAZW,UAAO,GAKL,OAAO,CAAC,OAAO,CAAC,CAoB5B;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,qFAlBW,UAAO,GAWL,OAAO,CAAC,OAAO,CAAC,CAuC5B;IAED;;;;;;;;OAQG;IACH,2BAPW,UAAO,GAEL,OAAO,CAAC,IAAI,CAAC,CAOzB;IAwWD;;;;;OAKG;IACH,yBAEC;IAED;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCA6DC;;CACF;iBArwCgB,WAAW;mBACT,aAAa;uBACT,iBAAiB;iBAYvB,WAAW;mCADO,uCAAuC;kBAExD,iCAAiC;oBAJ/B,cAAc;8BAKJ,kCAAkC;8BAClC,kCAAkC;gCAChC,oCAAoC;mBAMjD,cAAc;8BAJH,sCAAsC;uBAK7C,+BAA+B"} \ No newline at end of file diff --git a/dist/src/structures/ModalResponse.d.ts b/dist/src/structures/ModalResponse.d.ts new file mode 100644 index 00000000..12c7001f --- /dev/null +++ b/dist/src/structures/ModalResponse.d.ts @@ -0,0 +1,18 @@ +export default ModalResponse; +/** + * Represents when a modal is submitted. + * @see {@link https://discord.com/developers/docs/interactions/message-components#text-input-object-text-input-interaction} + * @extends {Interaction} + */ +declare class ModalResponse extends Interaction { + /** + * The entered modal values. + * @type {Array} + * @readonly + * @public + */ + public readonly get values(): any[]; + #private; +} +import Interaction from "./Interaction.js"; +//# sourceMappingURL=ModalResponse.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/ModalResponse.d.ts.map b/dist/src/structures/ModalResponse.d.ts.map new file mode 100644 index 00000000..1165860c --- /dev/null +++ b/dist/src/structures/ModalResponse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ModalResponse.d.ts","sourceRoot":"","sources":["../../../src/structures/ModalResponse.js"],"names":[],"mappings":";AAKA;;;;GAIG;AACH;IAuBE;;;;;OAKG;IACH,oCAEC;;CAkDF;wBAzFuB,kBAAkB"} \ No newline at end of file diff --git a/dist/src/structures/OptionSelect.d.ts b/dist/src/structures/OptionSelect.d.ts new file mode 100644 index 00000000..37204bd1 --- /dev/null +++ b/dist/src/structures/OptionSelect.d.ts @@ -0,0 +1,47 @@ +export default OptionSelect; +/** + * Represents when an option is selected. + * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-message-component-data-structure} + * @extends {Interaction} + */ +declare class OptionSelect extends Interaction { + /** + * Creates an option selected interaction structure. + * @param {Client} client The client instance. + * @param {Object} data The interaction data from Discord. + * @param {Object} options Additional options for this structure. + * @param {String} options.guildId The ID of the guild that this interaction belongs to. + * @param {String} options.channelId The ID of the channel that this interaction belongs to. + */ + constructor(client: Client, data: any, { channelId, guildId }: { + guildId: string; + channelId: string; + }); + /** + * The custom id of the select menu. + * @type {String} + * @readonly + * @public + */ + public readonly get customId(): string; + /** + * The message which the option belongs to. + * @type {Message} + * @readonly + * @public + */ + public readonly get message(): Message; + /** + * The values selected from the select menu. + * @type {Array} + * @readonly + * @see {@link https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-option-structure} + * @public + */ + public readonly get values(): any[]; + #private; +} +import Interaction from "./Interaction.js"; +import Message from "./Message.js"; +import Client from "../Client.js"; +//# sourceMappingURL=OptionSelect.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/OptionSelect.d.ts.map b/dist/src/structures/OptionSelect.d.ts.map new file mode 100644 index 00000000..10a55a44 --- /dev/null +++ b/dist/src/structures/OptionSelect.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"OptionSelect.d.ts","sourceRoot":"","sources":["../../../src/structures/OptionSelect.js"],"names":[],"mappings":";AAMA;;;;GAIG;AACH;IAKE;;;;;;;OAOG;IACH,oBANW,MAAM,qCAGd;QAAwB,OAAO;QACP,SAAS;KACnC,EA4CA;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;;OAMG;IACH,oCAEC;;CAkDF;wBAlJuB,kBAAkB;oBACtB,cAAc;mBAHf,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/PermissionOverwrite.d.ts b/dist/src/structures/PermissionOverwrite.d.ts new file mode 100644 index 00000000..c3a5ab7f --- /dev/null +++ b/dist/src/structures/PermissionOverwrite.d.ts @@ -0,0 +1,53 @@ +export default PermissionOverwrite; +declare class PermissionOverwrite { + /** + * Creates the structure for a permission overwrite. + * @param {Client} client The client instance. + * @param {Object} data The raw permission overwrite data. + */ + constructor(client: Client, data: any); + /** + * The ID of the overwrite. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The type of the overwrite. 0 for role, 1 for member. + * @type {String} + * @readonly + * @public + */ + public readonly get type(): string; + /** + * The permissions for the overwrite. + * @type {String} + * @readonly + * @public + */ + public readonly get allow(): string; + /** + * The denied permissions for the overwrite. + * @type {String} + * @readonly + * @public + */ + public readonly get deny(): string; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import Client from "../Client.js"; +//# sourceMappingURL=PermissionOverwrite.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/PermissionOverwrite.d.ts.map b/dist/src/structures/PermissionOverwrite.d.ts.map new file mode 100644 index 00000000..109a9de9 --- /dev/null +++ b/dist/src/structures/PermissionOverwrite.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"PermissionOverwrite.d.ts","sourceRoot":"","sources":["../../../src/structures/PermissionOverwrite.js"],"names":[],"mappings":";AAIA;IAME;;;;OAIG;IACH,oBAHW,MAAM,aAuChB;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCAcC;;CACF;mBAnIkB,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/Poll.d.ts b/dist/src/structures/Poll.d.ts new file mode 100644 index 00000000..91969dfa --- /dev/null +++ b/dist/src/structures/Poll.d.ts @@ -0,0 +1,93 @@ +export default Poll; +declare class Poll { + /** + * Creates the structure for a poll. + * @param {Client} client The client instance. + * @param {Object} data The raw poll data from Discord. + * @param {Object} options The additional options for this structure. + * @param {String} options.guildId The ID of the guild that this poll belongs to. + */ + constructor(client: Client, data: any, { guildId }?: { + guildId: string; + }); + /** + * The ID of the guild that this poll belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get guildId(): string; + /** + * The guild that this poll belongs to. + * @type {Guild} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * The question of the poll. + * @type {String} + * @readonly + * @public + */ + public readonly get question(): string; + /** + * The answers of the poll. + * @type {Array} + * @readonly + * @public + */ + public readonly get answers(): any[]; + /** + * The UNIX timestamp of the expiry time for the poll. + * @type {Number} + * @readonly + * @public + */ + public readonly get expiry(): number; + /** + * Whether the poll allows multiselect. + * @type {Boolean} + * @readonly + * @public + */ + public readonly get allowMultiselect(): boolean; + /** + * The layout type of the poll. + * @type {String} + * @readonly + * @public + */ + public readonly get layoutType(): string; + /** + * The raw layout type of the poll. + * @type {Number} + * @readonly + * @public + */ + public readonly get rawLayoutType(): number; + /** + * The poll responses. + * @type {MessagePollManager} + * @readonly + * @public + */ + public readonly get _results(): MessagePollManager; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import MessagePollManager from "../managers/MessagePollManager.js"; +import Client from "../Client.js"; +//# sourceMappingURL=Poll.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/Poll.d.ts.map b/dist/src/structures/Poll.d.ts.map new file mode 100644 index 00000000..1229dbf4 --- /dev/null +++ b/dist/src/structures/Poll.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Poll.d.ts","sourceRoot":"","sources":["../../../src/structures/Poll.js"],"names":[],"mappings":";AAMA;IASE;;;;;;OAMG;IACH,oBALW,MAAM,2BAGd;QAAwB,OAAO;KACjC,EAgEA;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,qCAQC;IAED;;;;;OAKG;IACH,qCAEC;IAED;;;;;OAKG;IACH,gDAEC;IAED;;;;;OAKG;IACH,yCAGC;IAED;;;;;OAKG;IACH,4CAEC;IAED;;;;;OAKG;IACH,mDAEC;IAED;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCA2BC;;CACF;+BAzO8B,mCAAmC;mBAF/C,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/Reaction.d.ts b/dist/src/structures/Reaction.d.ts new file mode 100644 index 00000000..bfa44024 --- /dev/null +++ b/dist/src/structures/Reaction.d.ts @@ -0,0 +1,99 @@ +export default Reaction; +/** + * Represents a reaction belonging to a message. + */ +declare class Reaction { + /** + * Creates the structure for a reaction. + * @param {Client} client The client instance. + * @param {Object} data The raw reaction data from Discord. + * @param {Object} options Additional options for this structure. + * @param {String} options.guildId The id of the guild that the reaction belongs to. + * @see {@link https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure} + */ + constructor(client: Client, data: any, { guildId }?: { + guildId: string; + }); + /** + * The number of reactions to this message. + * @readonly + * @type {Number} + * @public + */ + public readonly get count(): number; + /** + * The member objects of the members who reacted. Returns the user id of the member cannot be found. + * @readonly + * @type {Array} + * @public + */ + public readonly get reacted(): any[]; + /** + * The user ids of the users who reacted. + * @readonly + * @type {Array} + * @public + */ + public readonly get reactedIds(): string[]; + /** + * The id of the guild that this reaction belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get guildId(): string; + /** + * The guild that this reaction belongs to. + * @type {Guild?} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * The emoji used for the reaction. + * @type {Emoji} + * @readonly + * @public + */ + public readonly get emoji(): Emoji; + /** + * The user who added the first reaction. + * @type {String?} + * @readonly + * @public + */ + public readonly get initialReactor(): string; + /** + * Adds a user to the list of reactors. + * @param {String} userId The id of the user to add as a reactor. + * @throws {TypeError} + * @public + * @method + */ + public _addReactor(userId: string): void; + /** + * Removes a user from the list of reactors. + * @param {String} userId The id of the user to add as a reactor. + * @throws {TypeError} + * @public + * @method + */ + public _removeReactor(userId: string): void; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import Emoji from "./Emoji.js"; +import Client from "../Client.js"; +//# sourceMappingURL=Reaction.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/Reaction.d.ts.map b/dist/src/structures/Reaction.d.ts.map new file mode 100644 index 00000000..f6ee7586 --- /dev/null +++ b/dist/src/structures/Reaction.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Reaction.d.ts","sourceRoot":"","sources":["../../../src/structures/Reaction.js"],"names":[],"mappings":";AAKA;;GAEG;AACH;IAOE;;;;;;;OAOG;IACH,oBANW,MAAM,2BAGd;QAAwB,OAAO;KAC/B,EAiDF;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;OAKG;IACH,qCAOC;IAED;;;;;OAKG;IACH,2CAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,6CAEC;IAED;;;;;;OAMG;IACH,yCAUC;IAED;;;;;;OAMG;IACH,4CAOC;IAED;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCAkBC;;CACF;kBA9NiB,YAAY;mBAFX,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/Role.d.ts b/dist/src/structures/Role.d.ts new file mode 100644 index 00000000..a2469147 --- /dev/null +++ b/dist/src/structures/Role.d.ts @@ -0,0 +1,154 @@ +export default Role; +/** + * Represents a role belonging to a guild. + */ +declare class Role { + /** + * Returns a mention for the role. + * @param {String} roleId The ID of the role to mention. + * @returns {String} + * @public + * @static + * @method + */ + public static getMention(roleId: string): string; + /** + * Returns the URL of the role's icon. + * @param {String} id The ID of the role. + * @param {String?} hash The hash of the role's icon. + * @returns {String} + */ + static getIconUrl(id: string, hash: string | null): string; + /** + * Determines whether the role should be cached. + * @param {GluonCacheOptions} gluonCacheOptions The cache options for the client. + * @param {GuildCacheOptions} guildCacheOptions The cache options for the guild. + * @returns {Boolean} + * @public + * @static + * @method + */ + public static shouldCache(gluonCacheOptions: GluonCacheOptions, guildCacheOptions: GuildCacheOptions): boolean; + /** + * Creates the structure for a role. + * @param {Client} client The client instance. + * @param {Object} data The raw role data from Discord. + * @param {Object} options Additional options for this structure. + * @param {String} options.guildId The id of the guild that the role belongs to. + * @param {Boolean?} options.nocache Whether this role should be cached or not. + * @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-structure} + */ + constructor(client: Client, data: any, { guildId, nocache }?: { + guildId: string; + nocache: boolean | null; + }); + /** + * The ID of the role. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * Whether the role is hoisted. + * @readonly + * @returns {Boolean} + * @public + */ + public readonly get hoist(): boolean; + /** + * Whether the role is managed (by an application). + * @readonly + * @returns {Boolean} + * @public + */ + public readonly get managed(): boolean; + /** + * Whether the role is mentionable. + * @readonly + * @returns {Boolean} + * @public + */ + public readonly get mentionable(): boolean; + /** + * The icon URL of the role. + * @readonly + * @type {String?} + * @public + */ + public readonly get displayIconURL(): string; + /** + * The guild that this role belongs to. + * @type {Guild?} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * The ID of the guild that this role belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get guildId(): string; + /** + * The name of the role. + * @type {String} + * @readonly + * @public + */ + public readonly get name(): string; + /** + * The color of the role. + * @type {Number} + * @readonly + * @public + */ + public readonly get color(): number; + /** + * The position of the role. + * @type {Number} + * @readonly + * @public + */ + public readonly get position(): number; + /** + * The permissions for the role. + * @type {String} + * @readonly + * @public + */ + public readonly get permissions(): string; + /** + * The attributes of the role. + * @type {Object} + * @readonly + * @public + */ + public readonly get tags(): any; + /** + * Returns a mention for the role. + * @type {String} + * @readonly + * @public + */ + public readonly get mention(): string; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import GluonCacheOptions from "../managers/GluonCacheOptions.js"; +import GuildCacheOptions from "../managers/GuildCacheOptions.js"; +import Client from "../Client.js"; +//# sourceMappingURL=Role.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/Role.d.ts.map b/dist/src/structures/Role.d.ts.map new file mode 100644 index 00000000..e3ff90f1 --- /dev/null +++ b/dist/src/structures/Role.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Role.d.ts","sourceRoot":"","sources":["../../../src/structures/Role.js"],"names":[],"mappings":";AAMA;;GAEG;AACH;IA6QE;;;;;;;OAOG;IACH,iDAIC;IAED;;;;;OAKG;IACH,oCAHW,aAAO,UAajB;IAED;;;;;;;;OAQG;IACH,6CAPW,iBAAiB,qBACjB,iBAAiB,WAkB3B;IAvTD;;;;;;;;OAQG;IACH,oBAPW,MAAM,oCAGd;QAAwB,OAAO;QACL,OAAO,EAAzB,cAAQ;KAChB,EAwFF;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,qCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,2CAEC;IAiCD;;;;;OAKG;IACH,6CAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,0CAEC;IAED;;;;;OAKG;IACH,gCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAyDD;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCA+BC;;CACF;8BAlY6B,kCAAkC;8BAClC,kCAAkC;mBAH7C,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/ScheduledEvent.d.ts b/dist/src/structures/ScheduledEvent.d.ts new file mode 100644 index 00000000..c3b8229e --- /dev/null +++ b/dist/src/structures/ScheduledEvent.d.ts @@ -0,0 +1,156 @@ +export default ScheduledEvent; +/** + * Represents an scheduled event. + * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure} + */ +declare class ScheduledEvent { + /** + * Returns the URL of the event's image. + * @param {String} id The id of the event. + * @param {String?} hash The hash of the event's image. + * @returns {String} + * @public + * @static + * @method + */ + public static getImageUrl(id: string, hash: string | null): string; + /** + * Determines whether the scheduled event should be cached. + * @param {GluonCacheOptions} gluonCacheOptions The cache options for the client. + * @param {GuildCacheOptions} guildCacheOptions The cache options for the guild. + * @returns {Boolean} + * @public + * @static + * @method + */ + public static shouldCache(gluonCacheOptions: GluonCacheOptions, guildCacheOptions: GuildCacheOptions): boolean; + /** + * Creates the structure for a scheduled event. + * @param {Client} client The client instance. + * @param {Object} data Scheduled event data from Discord. + * @param {Object} options Additional options for this structure. + * @param {String} options.guildId The ID of the guild that this event belongs to. + * @param {Boolean?} options.nocache Whether this event should be cached or not. + */ + constructor(client: Client, data: any, { guildId, nocache }?: { + guildId: string; + nocache: boolean | null; + }); + /** + * The ID of the event. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The guild ID of the event. + * @type {String} + * @readonly + * @public + */ + public readonly get guildId(): string; + /** + * The name of the event. + * @type {String} + * @readonly + * @public + */ + public readonly get name(): string; + /** + * The ID of the user who created the event. + * @type {String?} + * @readonly + * @public + */ + public readonly get creatorId(): string; + /** + * The user who created the event. + * @type {User?} + * @readonly + * @public + */ + public readonly get creator(): User; + /** + * The description of the event. + * @type {String} + * @readonly + * @public + */ + public readonly get description(): string; + /** + * The url of the events's image. + * @readonly + * @type {String?} + * @public + */ + public readonly get displayImageURL(): string; + /** + * Where the event is scheduled to take place. + * @readonly + * @type {String} + * @public + */ + public readonly get entityType(): string; + /** + * The status of the event. + * @readonly + * @type {String} + * @public + */ + public readonly get status(): string; + /** + * The guild that this event belongs to. + * @type {Guild?} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * The UNIX timestamp of the start time for the event. + * @type {Number} + * @readonly + * @public + */ + public readonly get scheduledStartTime(): number; + /** + * The UNIX timestamp of the end time for the event. + * @type {Number?} + * @readonly + * @public + */ + public readonly get scheduledEndTime(): number; + /** + * The number of users who have signed up for the event. + * @type {Number} + * @readonly + * @public + */ + public readonly get userCount(): number; + /** + * The location of the event. + * @type {String?} + * @readonly + * @public + */ + public readonly get location(): string; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import User from "./User.js"; +import GluonCacheOptions from "../managers/GluonCacheOptions.js"; +import GuildCacheOptions from "../managers/GuildCacheOptions.js"; +import Client from "../Client.js"; +//# sourceMappingURL=ScheduledEvent.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/ScheduledEvent.d.ts.map b/dist/src/structures/ScheduledEvent.d.ts.map new file mode 100644 index 00000000..eb0fbe30 --- /dev/null +++ b/dist/src/structures/ScheduledEvent.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ScheduledEvent.d.ts","sourceRoot":"","sources":["../../../src/structures/ScheduledEvent.js"],"names":[],"mappings":";AAOA;;;GAGG;AACH;IAkXE;;;;;;;;OAQG;IACH,4CANW,aAAO,UAgBjB;IAED;;;;;;;;OAQG;IACH,6CAPW,iBAAiB,qBACjB,iBAAiB,WAkB3B;IA9YD;;;;;;;OAOG;IACH,oBANW,MAAM,oCAGd;QAAwB,OAAO;QACL,OAAO,EAAzB,cAAQ;KAClB,EA4JA;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;OAKG;IACH,0CAEC;IA+BD;;;;;OAKG;IACH,8CAEC;IAED;;;;;OAKG;IACH,yCAKC;IASD;;;;;OAKG;IACH,qCAMC;IAUD;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,iDAEC;IAED;;;;;OAKG;IACH,+CAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,uCAEC;IA8CD;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCA2BC;;CACF;iBA5dgB,WAAW;8BAEE,kCAAkC;8BAClC,kCAAkC;mBAE7C,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/SlashCommand.d.ts b/dist/src/structures/SlashCommand.d.ts new file mode 100644 index 00000000..fb58409d --- /dev/null +++ b/dist/src/structures/SlashCommand.d.ts @@ -0,0 +1,18 @@ +export default SlashCommand; +/** + * Represents a slash command. + * @see {@link https://discord.com/developers/docs/interactions/slash-commands} + * @extends {Interaction} + */ +declare class SlashCommand extends Interaction { + /** + * The raw slash command data from Discord. + * @type {Object?} + * @readonly + * @public + */ + public readonly get data(): any; + #private; +} +import Interaction from "./Interaction.js"; +//# sourceMappingURL=SlashCommand.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/SlashCommand.d.ts.map b/dist/src/structures/SlashCommand.d.ts.map new file mode 100644 index 00000000..1ab531cd --- /dev/null +++ b/dist/src/structures/SlashCommand.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SlashCommand.d.ts","sourceRoot":"","sources":["../../../src/structures/SlashCommand.js"],"names":[],"mappings":";AAKA;;;;GAIG;AACH;IAwBE;;;;;OAKG;IACH,gCAEC;;CAwCF;wBAhFuB,kBAAkB"} \ No newline at end of file diff --git a/dist/src/structures/Sticker.d.ts b/dist/src/structures/Sticker.d.ts new file mode 100644 index 00000000..9a9e47e8 --- /dev/null +++ b/dist/src/structures/Sticker.d.ts @@ -0,0 +1,63 @@ +export default Sticker; +/** + * Represents an sticker. + */ +declare class Sticker { + /** + * Creates the structure for a sticker + * @param {Client} client The client instance. + * @param {Object} data Sticker data from Discord. + */ + constructor(client: Client, data: any); + /** + * The ID of the sticker. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The name of the sticker. + * @type {String} + * @readonly + * @public + */ + public readonly get name(): string; + /** + * The format of the sticker. + * @type {String} + * @readonly + * @public + */ + public readonly get format(): string; + /** + * The format type of the sticker. + * @type {Number} + * @readonly + * @public + */ + public readonly get formatType(): number; + /** + * The URL to an image of the sticker. Returns NULL if image is a LOTTIE file. + * @type {String?} + * @readonly + * @public + */ + public readonly get previewImageURL(): string; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import Client from "../Client.js"; +//# sourceMappingURL=Sticker.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/Sticker.d.ts.map b/dist/src/structures/Sticker.d.ts.map new file mode 100644 index 00000000..088be9bf --- /dev/null +++ b/dist/src/structures/Sticker.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Sticker.d.ts","sourceRoot":"","sources":["../../../src/structures/Sticker.js"],"names":[],"mappings":";AASA;;GAEG;AACH;IAKE;;;;OAIG;IACH,oBAHW,MAAM,aAoChB;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,qCAEC;IAED;;;;;OAKG;IACH,yCAEC;IAED;;;;;OAKG;IACH,8CAgBC;IAED;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCAaC;;CACF;mBA9JkB,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/TextChannel.d.ts b/dist/src/structures/TextChannel.d.ts new file mode 100644 index 00000000..58b2993a --- /dev/null +++ b/dist/src/structures/TextChannel.d.ts @@ -0,0 +1,35 @@ +export default TextChannel; +/** + * Represents a text channel within Discord. + * @extends {Channel} + * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-example-guild-text-channel} + */ +declare class TextChannel extends Channel { + /** + * Creates the structure for a text channel. + * @param {Client} client The client instance. + * @param {Object} data Raw channel data. + * @param {Object} options Additional options for this structure. + * @param {String} options.guildId The ID of the guild that this channel belongs to. + * @param {Boolean?} options.nocache Whether this channel should be cached or not. + * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-example-guild-text-channel} + */ + constructor(client: Client, data: any, { guildId, nocache }?: { + guildId: string; + nocache: boolean | null; + }); + /** + * Bulk deletes all the message IDs provided. + * @param {String[]} messages An array of message IDs, as strings. + * @returns {Promise} + * @method + * @async + * @public + * @throws {Error | TypeError} + */ + public bulkDelete(messages: string[], { reason }?: {}): Promise; + #private; +} +import Channel from "./Channel.js"; +import Client from "../Client.js"; +//# sourceMappingURL=TextChannel.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/TextChannel.d.ts.map b/dist/src/structures/TextChannel.d.ts.map new file mode 100644 index 00000000..63725340 --- /dev/null +++ b/dist/src/structures/TextChannel.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"TextChannel.d.ts","sourceRoot":"","sources":["../../../src/structures/TextChannel.js"],"names":[],"mappings":";AAOA;;;;GAIG;AACH;IAEE;;;;;;;;OAQG;IACH,oBAPW,MAAM,oCAGd;QAAwB,OAAO;QACL,OAAO,EAAzB,cAAQ;KAChB,EAiCF;IAED;;;;;;;;OAQG;IACH,4BAPW,QAAQ,oBACN,OAAO,CAAC,IAAI,CAAC,CAmCzB;;CAsCF;oBAnImB,cAAc;mBAIf,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/Thread.d.ts b/dist/src/structures/Thread.d.ts new file mode 100644 index 00000000..65f14d3a --- /dev/null +++ b/dist/src/structures/Thread.d.ts @@ -0,0 +1,46 @@ +export default Thread; +/** + * Represents a thread within Discord. + * @extends {Channel} + * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-example-thread-channel} + */ +declare class Thread extends Channel { + /** + * Creates the structure for a thread. + * @param {Client} client The client instance. + * @param {Object} data Raw channel data. + * @param {Object} options Additional options for this structure. + * @param {String} options.guildId The ID of the guild that this thread belongs to. + * @param {Boolean?} options.nocache Whether this thread should be cached or not. + * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-example-thread-channel} + */ + constructor(client: Client, data: any, { guildId, nocache }?: { + guildId: string; + nocache: boolean | null; + }); + /** + * The ID of the member who created this thread. + * @type {String} + * @readonly + * @public + */ + public readonly get ownerId(): string; + /** + * The member who created this thread. + * @type {Member?} + * @readonly + * @public + */ + public readonly get owner(): Member; + /** + * The text channel that this thread belongs to. + * @type {TextChannel?} + * @readonly + * @public + */ + public readonly get parent(): TextChannel; + #private; +} +import Channel from "./Channel.js"; +import Client from "../Client.js"; +//# sourceMappingURL=Thread.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/Thread.d.ts.map b/dist/src/structures/Thread.d.ts.map new file mode 100644 index 00000000..0d0bad56 --- /dev/null +++ b/dist/src/structures/Thread.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Thread.d.ts","sourceRoot":"","sources":["../../../src/structures/Thread.js"],"names":[],"mappings":";AAOA;;;;GAIG;AACH;IAIE;;;;;;;;OAQG;IACH,oBAPW,MAAM,oCAGd;QAAwB,OAAO;QACL,OAAO,EAAzB,cAAQ;KAChB,EAyCF;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,oCAEC;IAYD;;;;;OAKG;IACH,0CAEC;;CAgEF;oBApKmB,cAAc;mBAJf,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/User.d.ts b/dist/src/structures/User.d.ts new file mode 100644 index 00000000..a81b3e9e --- /dev/null +++ b/dist/src/structures/User.d.ts @@ -0,0 +1,147 @@ +export default User; +/** + * Represents a Discord user. + * @see {@link https://discord.com/developers/docs/resources/user} + */ +declare class User { + /** + * Returns a mention string for the user. + * @param {String} id The ID of the user to mention. + * @returns {String} + * @public + * @static + * @method + */ + public static getMention(id: string): string; + /** + * Returns the URL to the user's avatar. + * @param {String} id The ID of the user to get the avatar for. + * @param {String?} hash The hash of the avatar. + * @returns {String} + * @public + * @static + * @method + */ + public static getAvatarUrl(id: string, hash: string | null): string; + /** + * Determines whether the user should be cached. + * @param {GluonCacheOptions} gluonCacheOptions The cache options for the client. + * @param {GuildCacheOptions} guildCacheOptions The cache options for the guild. + * @returns {Boolean} + * @public + * @static + * @method + */ + public static shouldCache(gluonCacheOptions: GluonCacheOptions): boolean; + /** + * Creates a structure for a user. + * @param {Client} client The client instance. + * @param {Object} data The raw user data. + * @param {Object?} options Additional options for this structure. + * @param {Boolean?} options.nocache Whether the user should be cached or not. + * @see {@link https://discord.com/developers/docs/resources/user#user-object} + */ + constructor(client: Client, data: any, { nocache }?: any | null); + /** + * Overrides the user's avatar with a custom URL. + * @param {String} url The URL of the avatar to override the user's avatar with. + * @public + * @method + * @returns {void} + */ + public overrideAvatarURL(url: string): void; + /** + * The ID of the user. + * @type {String} + * @readonly + * @public + */ + public readonly get id(): string; + /** + * The username of the user. + * @type {String} + * @readonly + * @public + */ + public readonly get username(): string; + /** + * The global name of the user. + * @type {String} + * @readonly + * @public + */ + public readonly get globalName(): string; + /** + * The discriminator of the user. + * @type {String?} + * @readonly + * @public + */ + public readonly get discriminator(): string; + /** + * The UNIX (seconds) timestamp when this user was last cached. + * @type {Number} + * @readonly + * @public + */ + public readonly get _cached(): number; + /** + * The mention string for the user. + * @type {String} + * @readonly + * @public + */ + public readonly get mention(): string; + /** + * The avatar URL of the user. + * @readonly + * @type {String} + * @public + */ + public readonly get displayAvatarURL(): string; + /** + * The username of the user, including their discriminator if they are a bot (username#0001). + * @readonly + * @type {String} + * @public + */ + public readonly get tag(): string; + /** + * The UNIX (seconds) timestamp of when this user created their Discord account. + * @readonly + * @type {Number} + * @public + */ + public readonly get createdTimestamp(): number; + /** + * Whether the user is a bot or not. + * @readonly + * @type {Boolean} + * @public + */ + public readonly get bot(): boolean; + /** + * Whether the user has an animated avatar or not. + * @readonly + * @type {Boolean} + * @public + */ + public readonly get avatarIsAnimated(): boolean; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import GluonCacheOptions from "../managers/GluonCacheOptions.js"; +import Client from "../Client.js"; +//# sourceMappingURL=User.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/User.d.ts.map b/dist/src/structures/User.d.ts.map new file mode 100644 index 00000000..48a1afc2 --- /dev/null +++ b/dist/src/structures/User.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../src/structures/User.js"],"names":[],"mappings":";AAMA;;;GAGG;AACH;IAuQE;;;;;;;OAOG;IACH,6CAIC;IAED;;;;;;;;OAQG;IACH,6CANW,aAAO,UAiBjB;IAED;;;;;;;;OAQG;IACH,6CAPW,iBAAiB,WAc3B;IAjTD;;;;;;;OAOG;IACH,oBANW,MAAM,2BAEN,UAAO,EAsFjB;IAED;;;;;;OAMG;IACH,uCAFa,IAAI,CAIhB;IAED;;;;;OAKG;IACH,iCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,yCAEC;IAED;;;;;OAKG;IACH,4CAOC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAiCD;;;;;OAKG;IACH,+CAIC;IAED;;;;;OAKG;IACH,kCAIC;IAED;;;;;OAKG;IACH,+CAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,gDAEC;IAwDD;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCA0BC;;CACF;8BAvX6B,kCAAkC;mBAE7C,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/VoiceChannel.d.ts b/dist/src/structures/VoiceChannel.d.ts new file mode 100644 index 00000000..fe985155 --- /dev/null +++ b/dist/src/structures/VoiceChannel.d.ts @@ -0,0 +1,44 @@ +export default VoiceChannel; +/** + * Represents a voice channel. + * @extends {Channel} + */ +declare class VoiceChannel extends Channel { + /** + * Creates the structure for a voice channel. + * @param {Client} client The client instance. + * @param {Object} data The raw channel data from Discord. + * @param {Object} options Additional options for this structure. + * @param {String} options.guildId The id of the guild that the voice channel belongs to. + * @param {Boolean?} options.nocache Whether the voice channel should be cached. + */ + constructor(client: Client, data: any, { guildId, nocache }?: { + guildId: string; + nocache: boolean | null; + }); + /** + * The bitrate of the channel. + * @type {Number} + * @readonly + * @public + */ + public readonly get bitrate(): number; + /** + * The user limit of the channel. + * @type {Number} + * @readonly + * @public + */ + public readonly get userLimit(): number; + /** + * The region of the voice channel. + * @type {String} + * @readonly + * @public + */ + public readonly get rtcRegion(): string; + #private; +} +import Channel from "./Channel.js"; +import Client from "../Client.js"; +//# sourceMappingURL=VoiceChannel.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/VoiceChannel.d.ts.map b/dist/src/structures/VoiceChannel.d.ts.map new file mode 100644 index 00000000..30928aca --- /dev/null +++ b/dist/src/structures/VoiceChannel.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"VoiceChannel.d.ts","sourceRoot":"","sources":["../../../src/structures/VoiceChannel.js"],"names":[],"mappings":";AAMA;;;GAGG;AACH;IAKE;;;;;;;OAOG;IACH,oBANW,MAAM,oCAGd;QAAwB,OAAO;QACL,OAAO,EAAzB,cAAQ;KAClB,EAgEA;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,wCAEC;;CAyCF;oBA3JmB,cAAc;mBAFf,cAAc"} \ No newline at end of file diff --git a/dist/src/structures/VoiceState.d.ts b/dist/src/structures/VoiceState.d.ts new file mode 100644 index 00000000..0dccae0e --- /dev/null +++ b/dist/src/structures/VoiceState.d.ts @@ -0,0 +1,152 @@ +export default VoiceState; +/** + * Represents a voice state. + */ +declare class VoiceState { + /** + * Determines whether the voice state should be cached. + * @param {GluonCacheOptions} gluonCacheOptions The cache options for the client. + * @param {GuildCacheOptions} guildCacheOptions The cache options for the guild. + * @returns {Boolean} + * @public + * @static + * @method + */ + public static shouldCache(gluonCacheOptions: GluonCacheOptions, guildCacheOptions: GuildCacheOptions): boolean; + /** + * Creates the structure for a voice state. + * @param {Client} client The client instance. + * @param {Object} data The raw voice state data from Discord. + * @param {Object} options The additional options for this structure. + * @param {String} options.guildId The id of the guild that the voice state belongs to. + * @param {Boolean?} options.nocache Whether this voice state should be cached. + */ + constructor(client: Client, data: any, { guildId, nocache }?: { + guildId: string; + nocache: boolean | null; + }); + /** + * Is server deafened? + * @readonly + * @type {Boolean} + * @public + */ + public readonly get deaf(): boolean; + /** + * Is server muted? + * @readonly + * @type {Boolean} + * @public + */ + public readonly get mute(): boolean; + /** + * Is self defeaned? + * @readonly + * @type {Boolean} + * @public + */ + public readonly get selfDeaf(): boolean; + /** + * Is self muted? + * @readonly + * @type {Boolean} + * @public + */ + public readonly get selfMute(): boolean; + /** + * Is streaming? + * @readonly + * @type {Boolean} + * @public + */ + public readonly get selfStream(): boolean; + /** + * Is sharing video? + * @readonly + * @type {Boolean} + * @public + */ + public readonly get selfVideo(): boolean; + /** + * Is suppressed (for stage channels)? + * @readonly + * @type {Boolean} + * @public + */ + public readonly get suppress(): boolean; + /** + * The guild that this voice state belongs to. + * @type {Guild?} + * @readonly + * @public + */ + public readonly get guild(): Guild; + /** + * The id of the guild that this voice state belongs to. + * @type {String} + * @readonly + * @public + */ + public readonly get guildId(): string; + /** + * The channel involved. + * @type {Channel?} + * @readonly + * @public + */ + public readonly get channel(): Channel; + /** + * The id of the channel involved. + * @type {String} + * @readonly + * @public + */ + public readonly get channelId(): string; + /** + * The member the voice state is about. + * @type {Member?} + * @readonly + * @public + */ + public readonly get member(): Member; + /** + * The id of the user the voice state is about. + * @type {String} + * @readonly + * @public + */ + public readonly get memberId(): string; + /** + * The UNIX time the user joined the voice channel. + * @type {Number} + * @readonly + * @public + */ + public readonly get joined(): number; + /** + * The UNIX timestamp of when the user requested to speak. + * @type {Number?} + * @readonly + * @public + */ + public readonly get requestToSpeakTimestamp(): number; + /** + * @method + * @public + */ + public toString(): string; + /** + * Returns the JSON representation of this structure. + * @param {Number} format The format to return the data in. + * @returns {Object} + * @public + * @method + */ + public toJSON(format: number): any; + #private; +} +import Member from "./Member.js"; +import GluonCacheOptions from "../managers/GluonCacheOptions.js"; +import GuildCacheOptions from "../managers/GuildCacheOptions.js"; +import Client from "../Client.js"; +//# sourceMappingURL=VoiceState.d.ts.map \ No newline at end of file diff --git a/dist/src/structures/VoiceState.d.ts.map b/dist/src/structures/VoiceState.d.ts.map new file mode 100644 index 00000000..14aafb29 --- /dev/null +++ b/dist/src/structures/VoiceState.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"VoiceState.d.ts","sourceRoot":"","sources":["../../../src/structures/VoiceState.js"],"names":[],"mappings":";AAOA;;GAEG;AACH;IAoRE;;;;;;;;OAQG;IACH,6CAPW,iBAAiB,qBACjB,iBAAiB,WAkB3B;IAhSD;;;;;;;OAOG;IACH,oBANW,MAAM,oCAGd;QAAwB,OAAO;QACL,OAAO,EAAzB,cAAQ;KAClB,EA4GA;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;OAKG;IACH,oCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,0CAEC;IAED;;;;;OAKG;IACH,yCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,mCAEC;IAED;;;;;OAKG;IACH,sCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,wCAEC;IAED;;;;;OAKG;IACH,qCAEC;IAED;;;;;OAKG;IACH,uCAEC;IAED;;;;;OAKG;IACH,qCAEC;IAED;;;;;OAKG;IACH,sDAEC;IAyBD;;;OAGG;IACH,0BAEC;IAUD;;;;;;OAMG;IACH,mCAiCC;;CACF;mBA1WkB,aAAa;8BAFF,kCAAkC;8BAClC,kCAAkC;mBAH7C,cAAc"} \ No newline at end of file diff --git a/dist/src/testData.d.ts b/dist/src/testData.d.ts new file mode 100644 index 00000000..fb44709d --- /dev/null +++ b/dist/src/testData.d.ts @@ -0,0 +1,1379 @@ +export namespace TEST_DATA { + let GUILD_ID: string; + namespace TEXT_CHANNEL { + let id: string; + let type: number; + let guild_id: string; + let name: string; + let position: number; + let permission_overwrites: any[]; + let rate_limit_per_user: number; + let nsfw: boolean; + let topic: string; + let last_message_id: any; + let parent_id: string; + let last_pin_timestamp: any; + } + namespace TEXT_CHANNEL_2 { + let id_1: string; + export { id_1 as id }; + let type_1: number; + export { type_1 as type }; + let guild_id_1: string; + export { guild_id_1 as guild_id }; + let name_1: string; + export { name_1 as name }; + let position_1: number; + export { position_1 as position }; + let permission_overwrites_1: ({ + id: string; + type: number; + allow: number; + deny: string; + } | { + id: string; + type: number; + allow: string; + deny: number; + })[]; + export { permission_overwrites_1 as permission_overwrites }; + let rate_limit_per_user_1: number; + export { rate_limit_per_user_1 as rate_limit_per_user }; + let nsfw_1: boolean; + export { nsfw_1 as nsfw }; + let topic_1: string; + export { topic_1 as topic }; + let last_message_id_1: any; + export { last_message_id_1 as last_message_id }; + let parent_id_1: string; + export { parent_id_1 as parent_id }; + let last_pin_timestamp_1: any; + export { last_pin_timestamp_1 as last_pin_timestamp }; + } + namespace VOICE_CHANNEL { + let id_2: string; + export { id_2 as id }; + let type_2: number; + export { type_2 as type }; + let guild_id_2: string; + export { guild_id_2 as guild_id }; + let name_2: string; + export { name_2 as name }; + let position_2: number; + export { position_2 as position }; + let permission_overwrites_2: any[]; + export { permission_overwrites_2 as permission_overwrites }; + let rate_limit_per_user_2: number; + export { rate_limit_per_user_2 as rate_limit_per_user }; + let nsfw_2: boolean; + export { nsfw_2 as nsfw }; + let topic_2: string; + export { topic_2 as topic }; + let last_message_id_2: any; + export { last_message_id_2 as last_message_id }; + let parent_id_2: string; + export { parent_id_2 as parent_id }; + let last_pin_timestamp_2: any; + export { last_pin_timestamp_2 as last_pin_timestamp }; + export let bitrate: number; + export let user_limit: number; + } + namespace CATEGORY_CHANNEL { + let id_3: string; + export { id_3 as id }; + let type_3: number; + export { type_3 as type }; + let guild_id_3: string; + export { guild_id_3 as guild_id }; + let name_3: string; + export { name_3 as name }; + let position_3: number; + export { position_3 as position }; + let permission_overwrites_3: { + id: string; + type: number; + allow: string; + deny: string; + }[]; + export { permission_overwrites_3 as permission_overwrites }; + let nsfw_3: boolean; + export { nsfw_3 as nsfw }; + let parent_id_3: any; + export { parent_id_3 as parent_id }; + } + namespace GUILD { + let id_4: string; + export { id_4 as id }; + let name_4: string; + export { name_4 as name }; + export let icon: any; + export let splash: any; + export let discovery_splash: any; + export let owner_id: string; + export let region: string; + export let afk_channel_id: any; + export let afk_timeout: number; + export let verification_level: number; + export let default_message_notifications: number; + export let explicit_content_filter: number; + export let roles: any[]; + export let emojis: any[]; + export let features: any[]; + export let mfa_level: number; + export let application_id: any; + export let system_channel_id: string; + export let system_channel_flags: number; + export let rules_channel_id: string; + export let joined_at: string; + export let large: boolean; + export let unavailable: boolean; + export let member_count: number; + export let voice_states: any[]; + export let members: any[]; + export let channels: ({ + id: string; + type: number; + guild_id: string; + name: string; + position: number; + permission_overwrites: any[]; + rate_limit_per_user: number; + nsfw: boolean; + topic: any; + last_message_id: any; + parent_id: any; + last_pin_timestamp: any; + bitrate?: undefined; + user_limit?: undefined; + } | { + id: string; + type: number; + guild_id: string; + name: string; + position: number; + permission_overwrites: any[]; + rate_limit_per_user: number; + nsfw: boolean; + topic: any; + last_message_id: any; + parent_id: any; + last_pin_timestamp: any; + bitrate: number; + user_limit: number; + })[]; + export let threads: any[]; + export let presences: any[]; + export let max_presences: number; + export let max_members: number; + export let vanity_url_code: any; + export let description: any; + export let banner: any; + export let premium_progress_bar_enabled: boolean; + export let premium_tier: number; + export let premium_subscription_count: number; + export let preferred_locale: string; + export let public_updates_channel_id: any; + export let max_video_channel_users: number; + export let approximate_member_count: number; + export let approximate_presence_count: number; + export let welcome_screen: any; + export let nsfw_level: number; + export let stage_instances: any[]; + export let stickers: any[]; + } + namespace THREAD { + let id_5: string; + export { id_5 as id }; + let type_4: number; + export { type_4 as type }; + let guild_id_4: string; + export { guild_id_4 as guild_id }; + let name_5: string; + export { name_5 as name }; + let position_4: number; + export { position_4 as position }; + let permission_overwrites_4: any[]; + export { permission_overwrites_4 as permission_overwrites }; + let rate_limit_per_user_3: number; + export { rate_limit_per_user_3 as rate_limit_per_user }; + let nsfw_4: boolean; + export { nsfw_4 as nsfw }; + let topic_3: string; + export { topic_3 as topic }; + let last_message_id_3: any; + export { last_message_id_3 as last_message_id }; + let parent_id_4: string; + export { parent_id_4 as parent_id }; + let last_pin_timestamp_3: any; + export { last_pin_timestamp_3 as last_pin_timestamp }; + let owner_id_1: string; + export { owner_id_1 as owner_id }; + } + let CHANNEL_ID: string; + let MESSAGE_ID: string; + namespace MESSAGE { + let id_6: string; + export { id_6 as id }; + let type_5: number; + export { type_5 as type }; + export let content: string; + export let channel_id: string; + export namespace author { + let id_7: string; + export { id_7 as id }; + export let username: string; + export let discriminator: string; + export let avatar: any; + export let bot: boolean; + export let system: boolean; + export let mfa_enabled: boolean; + export let locale: string; + export let verified: boolean; + export let email: any; + export let flags: number; + export let premium_type: number; + export let public_flags: number; + export let _cached: number; + } + export let edited_timestamp: string; + export let mention_everyone: boolean; + export let mentions: { + id: string; + username: string; + discriminator: string; + avatar: any; + bot: boolean; + system: boolean; + mfa_enabled: boolean; + locale: string; + verified: boolean; + flags: number; + premium_type: number; + public_flags: number; + }[]; + export let mention_roles: string[]; + export let mention_channels: string[]; + export let attachments: { + id: string; + filename: string; + size: number; + url: string; + proxy_url: string; + height: number; + width: number; + }[]; + export let embeds: { + title: string; + description: string; + url: string; + timestamp: string; + color: number; + footer: { + text: string; + icon_url: any; + proxy_icon_url: any; + }; + image: { + url: string; + proxy_url: string; + height: number; + width: number; + }; + thumbnail: { + url: string; + proxy_url: string; + height: number; + width: number; + }; + video: { + url: string; + }; + fields: { + name: string; + value: string; + inline: boolean; + }[]; + }[]; + export let reactions: { + count: number; + me: boolean; + emoji: { + id: string; + name: string; + }; + }[]; + export let pinned: boolean; + export let webhook_id: any; + export namespace message_reference { + export let message_id: string; + let channel_id_1: string; + export { channel_id_1 as channel_id }; + let guild_id_5: string; + export { guild_id_5 as guild_id }; + } + export let message_snapshots: { + id: string; + type: number; + content: string; + channel_id: string; + }[]; + export namespace referenced_message { + let id_8: string; + export { id_8 as id }; + let type_6: number; + export { type_6 as type }; + let content_1: string; + export { content_1 as content }; + let channel_id_2: string; + export { channel_id_2 as channel_id }; + } + export let sticker_items: { + id: string; + name: string; + format_type: number; + }[]; + export namespace poll { + let id_9: string; + export { id_9 as id }; + let channel_id_3: string; + export { channel_id_3 as channel_id }; + export let question: string; + export let options: { + id: string; + option: string; + }[]; + export let votes: { + user_id: string; + option_id: string; + }[]; + export let expiry: string; + } + } + let MEMBER_ID: string; + namespace MEMBER { + export namespace user { + let id_10: string; + export { id_10 as id }; + let username_1: string; + export { username_1 as username }; + let discriminator_1: string; + export { discriminator_1 as discriminator }; + let avatar_1: any; + export { avatar_1 as avatar }; + let bot_1: boolean; + export { bot_1 as bot }; + let system_1: boolean; + export { system_1 as system }; + let mfa_enabled_1: boolean; + export { mfa_enabled_1 as mfa_enabled }; + let locale_1: string; + export { locale_1 as locale }; + let verified_1: boolean; + export { verified_1 as verified }; + let email_1: any; + export { email_1 as email }; + let flags_1: number; + export { flags_1 as flags }; + let premium_type_1: number; + export { premium_type_1 as premium_type }; + let public_flags_1: number; + export { public_flags_1 as public_flags }; + } + export let nick: any; + let roles_1: any[]; + export { roles_1 as roles }; + let joined_at_1: string; + export { joined_at_1 as joined_at }; + export let premium_since: any; + export let deaf: boolean; + export let mute: boolean; + export let pending: boolean; + export let permissions: string; + let flags_2: number; + export { flags_2 as flags }; + } + let EVENT_ID: string; + let ROLE_ID: string; + namespace ATTACHMENT { + let id_11: string; + export { id_11 as id }; + export let filename: string; + export let size: number; + export let url: string; + export let proxy_url: string; + export let height: number; + export let width: number; + } + let FILE_NAME: string; + namespace AUDIT_LOG { + let id_12: string; + export { id_12 as id }; + let guild_id_6: string; + export { guild_id_6 as guild_id }; + export let user_id: string; + export let target_id: string; + export let action_type: number; + export let changes: any[]; + export namespace options_1 { + let channel_id_4: string; + export { channel_id_4 as channel_id }; + let id_13: string; + export { id_13 as id }; + let type_7: number; + export { type_7 as type }; + } + export { options_1 as options }; + export let reason: string; + export namespace context { + let id_14: string; + export { id_14 as id }; + let type_8: number; + export { type_8 as type }; + } + export let created_at: string; + } + namespace BUTTON_CLICK { + let id_15: string; + export { id_15 as id }; + let type_9: number; + export { type_9 as type }; + export namespace data { + let custom_id: string; + let component_type: number; + } + let guild_id_7: string; + export { guild_id_7 as guild_id }; + let channel_id_5: string; + export { channel_id_5 as channel_id }; + export namespace member { + export namespace user_1 { + let id_16: string; + export { id_16 as id }; + let username_2: string; + export { username_2 as username }; + let discriminator_2: string; + export { discriminator_2 as discriminator }; + let avatar_2: any; + export { avatar_2 as avatar }; + let bot_2: boolean; + export { bot_2 as bot }; + let system_2: boolean; + export { system_2 as system }; + let mfa_enabled_2: boolean; + export { mfa_enabled_2 as mfa_enabled }; + let locale_2: string; + export { locale_2 as locale }; + let verified_2: boolean; + export { verified_2 as verified }; + let email_2: any; + export { email_2 as email }; + let flags_3: number; + export { flags_3 as flags }; + let premium_type_2: number; + export { premium_type_2 as premium_type }; + let public_flags_2: number; + export { public_flags_2 as public_flags }; + } + export { user_1 as user }; + let roles_2: any[]; + export { roles_2 as roles }; + let joined_at_2: string; + export { joined_at_2 as joined_at }; + let premium_since_1: any; + export { premium_since_1 as premium_since }; + let deaf_1: boolean; + export { deaf_1 as deaf }; + let mute_1: boolean; + export { mute_1 as mute }; + let pending_1: boolean; + export { pending_1 as pending }; + let permissions_1: string; + export { permissions_1 as permissions }; + } + export let token: string; + export let version: number; + export namespace message { + let id_17: string; + export { id_17 as id }; + let type_10: number; + export { type_10 as type }; + let content_2: string; + export { content_2 as content }; + let channel_id_6: string; + export { channel_id_6 as channel_id }; + } + let custom_id_1: string; + export { custom_id_1 as custom_id }; + } + namespace CLIENT_USER { + let id_18: string; + export { id_18 as id }; + let username_3: string; + export { username_3 as username }; + let discriminator_3: string; + export { discriminator_3 as discriminator }; + let avatar_3: any; + export { avatar_3 as avatar }; + let bot_3: boolean; + export { bot_3 as bot }; + let system_3: boolean; + export { system_3 as system }; + let mfa_enabled_3: boolean; + export { mfa_enabled_3 as mfa_enabled }; + let locale_3: string; + export { locale_3 as locale }; + let verified_3: boolean; + export { verified_3 as verified }; + let email_3: any; + export { email_3 as email }; + let flags_4: number; + export { flags_4 as flags }; + let premium_type_3: number; + export { premium_type_3 as premium_type }; + let public_flags_3: number; + export { public_flags_3 as public_flags }; + } + namespace CLIENT_MEMBER { + export namespace user_2 { + let id_19: string; + export { id_19 as id }; + let username_4: string; + export { username_4 as username }; + let discriminator_4: string; + export { discriminator_4 as discriminator }; + let avatar_4: any; + export { avatar_4 as avatar }; + let bot_4: boolean; + export { bot_4 as bot }; + let system_4: boolean; + export { system_4 as system }; + let mfa_enabled_4: boolean; + export { mfa_enabled_4 as mfa_enabled }; + let locale_4: string; + export { locale_4 as locale }; + let verified_4: boolean; + export { verified_4 as verified }; + let email_4: any; + export { email_4 as email }; + let flags_5: number; + export { flags_5 as flags }; + let premium_type_4: number; + export { premium_type_4 as premium_type }; + let public_flags_4: number; + export { public_flags_4 as public_flags }; + } + export { user_2 as user }; + let nick_1: any; + export { nick_1 as nick }; + let roles_3: any[]; + export { roles_3 as roles }; + let joined_at_3: string; + export { joined_at_3 as joined_at }; + let premium_since_2: any; + export { premium_since_2 as premium_since }; + let deaf_2: boolean; + export { deaf_2 as deaf }; + let mute_2: boolean; + export { mute_2 as mute }; + let pending_2: boolean; + export { pending_2 as pending }; + } + namespace ROLE_ADMIN { + let id_20: string; + export { id_20 as id }; + let name_6: string; + export { name_6 as name }; + export let color: number; + export let hoist: boolean; + let position_5: number; + export { position_5 as position }; + let permissions_2: string; + export { permissions_2 as permissions }; + export let managed: boolean; + export let mentionable: boolean; + export namespace tags { + let bot_id: string; + let integration_id: any; + let premium_subscriber: any; + } + let icon_1: string; + export { icon_1 as icon }; + } + namespace ROLE_OVERRIDES { + let id_21: string; + export { id_21 as id }; + let name_7: string; + export { name_7 as name }; + let color_1: number; + export { color_1 as color }; + let hoist_1: boolean; + export { hoist_1 as hoist }; + let position_6: number; + export { position_6 as position }; + let permissions_3: string; + export { permissions_3 as permissions }; + let managed_1: boolean; + export { managed_1 as managed }; + let mentionable_1: boolean; + export { mentionable_1 as mentionable }; + let icon_2: string; + export { icon_2 as icon }; + } + namespace EMOJI { + let id_22: string; + export { id_22 as id }; + let name_8: string; + export { name_8 as name }; + let guild_id_8: string; + export { guild_id_8 as guild_id }; + export let animated: boolean; + } + namespace STANDARD_EMOJI { + let id_23: any; + export { id_23 as id }; + let name_9: string; + export { name_9 as name }; + } + namespace INTERACTION { + let id_24: string; + export { id_24 as id }; + let type_11: number; + export { type_11 as type }; + export namespace data_1 { + let name_10: string; + export { name_10 as name }; + let options_2: any[]; + export { options_2 as options }; + } + export { data_1 as data }; + let guild_id_9: string; + export { guild_id_9 as guild_id }; + let channel_id_7: string; + export { channel_id_7 as channel_id }; + export namespace member_1 { + export namespace user_3 { + let id_25: string; + export { id_25 as id }; + let username_5: string; + export { username_5 as username }; + let discriminator_5: string; + export { discriminator_5 as discriminator }; + let avatar_5: any; + export { avatar_5 as avatar }; + let bot_5: boolean; + export { bot_5 as bot }; + let system_5: boolean; + export { system_5 as system }; + let mfa_enabled_5: boolean; + export { mfa_enabled_5 as mfa_enabled }; + let locale_5: string; + export { locale_5 as locale }; + let verified_5: boolean; + export { verified_5 as verified }; + let email_5: any; + export { email_5 as email }; + let flags_6: number; + export { flags_6 as flags }; + let premium_type_5: number; + export { premium_type_5 as premium_type }; + let public_flags_5: number; + export { public_flags_5 as public_flags }; + } + export { user_3 as user }; + let roles_4: any[]; + export { roles_4 as roles }; + let joined_at_4: string; + export { joined_at_4 as joined_at }; + let premium_since_3: any; + export { premium_since_3 as premium_since }; + let deaf_3: boolean; + export { deaf_3 as deaf }; + let mute_3: boolean; + export { mute_3 as mute }; + let pending_3: boolean; + export { pending_3 as pending }; + let permissions_4: string; + export { permissions_4 as permissions }; + } + export { member_1 as member }; + let token_1: string; + export { token_1 as token }; + let version_1: number; + export { version_1 as version }; + } + namespace INVITE { + export let code: string; + let guild_id_10: string; + export { guild_id_10 as guild_id }; + export namespace channel { + let id_26: string; + export { id_26 as id }; + let name_11: string; + export { name_11 as name }; + let type_12: number; + export { type_12 as type }; + let nsfw_5: boolean; + export { nsfw_5 as nsfw }; + let parent_id_5: string; + export { parent_id_5 as parent_id }; + let topic_4: string; + export { topic_4 as topic }; + } + export namespace inviter { + let id_27: string; + export { id_27 as id }; + let username_6: string; + export { username_6 as username }; + let discriminator_6: string; + export { discriminator_6 as discriminator }; + let avatar_6: any; + export { avatar_6 as avatar }; + let bot_6: boolean; + export { bot_6 as bot }; + let system_6: boolean; + export { system_6 as system }; + let mfa_enabled_6: boolean; + export { mfa_enabled_6 as mfa_enabled }; + let locale_6: string; + export { locale_6 as locale }; + let verified_6: boolean; + export { verified_6 as verified }; + let email_6: any; + export { email_6 as email }; + let flags_7: number; + export { flags_7 as flags }; + let premium_type_6: number; + export { premium_type_6 as premium_type }; + let public_flags_6: number; + export { public_flags_6 as public_flags }; + } + export let target_user_id: any; + export let target_user_type: number; + let approximate_presence_count_1: number; + export { approximate_presence_count_1 as approximate_presence_count }; + let approximate_member_count_1: number; + export { approximate_member_count_1 as approximate_member_count }; + export let expires_at: string; + export let uses: number; + export let max_uses: number; + export let max_age: number; + export let temporary: boolean; + let created_at_1: string; + export { created_at_1 as created_at }; + } + namespace MODAL_RESPONSE { + let id_28: string; + export { id_28 as id }; + let type_13: number; + export { type_13 as type }; + export namespace data_2 { + let components: { + type: number; + components: { + custom_id: string; + type: number; + value: string; + }[]; + }[]; + } + export { data_2 as data }; + let guild_id_11: string; + export { guild_id_11 as guild_id }; + let channel_id_8: string; + export { channel_id_8 as channel_id }; + export namespace member_2 { + let avatar_7: any; + export { avatar_7 as avatar }; + let flags_8: number; + export { flags_8 as flags }; + export namespace user_4 { + let id_29: string; + export { id_29 as id }; + let username_7: string; + export { username_7 as username }; + let discriminator_7: string; + export { discriminator_7 as discriminator }; + let avatar_8: any; + export { avatar_8 as avatar }; + let bot_7: boolean; + export { bot_7 as bot }; + } + export { user_4 as user }; + let roles_5: any; + export { roles_5 as roles }; + let joined_at_5: string; + export { joined_at_5 as joined_at }; + let premium_since_4: any; + export { premium_since_4 as premium_since }; + let deaf_4: boolean; + export { deaf_4 as deaf }; + let mute_4: boolean; + export { mute_4 as mute }; + let pending_4: boolean; + export { pending_4 as pending }; + let permissions_5: string; + export { permissions_5 as permissions }; + } + export { member_2 as member }; + let token_2: string; + export { token_2 as token }; + let version_2: number; + export { version_2 as version }; + } + namespace OPTION_SELECT { + let application_id_1: string; + export { application_id_1 as application_id }; + let id_30: string; + export { id_30 as id }; + let type_14: number; + export { type_14 as type }; + export namespace data_3 { + let custom_id_2: string; + export { custom_id_2 as custom_id }; + let component_type_1: number; + export { component_type_1 as component_type }; + export let values: string[]; + } + export { data_3 as data }; + let guild_id_12: string; + export { guild_id_12 as guild_id }; + let channel_id_9: string; + export { channel_id_9 as channel_id }; + export namespace member_3 { + export namespace user_5 { + let id_31: string; + export { id_31 as id }; + let username_8: string; + export { username_8 as username }; + let discriminator_8: string; + export { discriminator_8 as discriminator }; + let avatar_9: any; + export { avatar_9 as avatar }; + let bot_8: boolean; + export { bot_8 as bot }; + export let global_name: string; + } + export { user_5 as user }; + let roles_6: any[]; + export { roles_6 as roles }; + let joined_at_6: string; + export { joined_at_6 as joined_at }; + let premium_since_5: any; + export { premium_since_5 as premium_since }; + let deaf_5: boolean; + export { deaf_5 as deaf }; + let mute_5: boolean; + export { mute_5 as mute }; + let pending_5: boolean; + export { pending_5 as pending }; + let permissions_6: string; + export { permissions_6 as permissions }; + let avatar_10: any; + export { avatar_10 as avatar }; + let flags_9: number; + export { flags_9 as flags }; + } + export { member_3 as member }; + export namespace message_1 { + let application_id_2: string; + export { application_id_2 as application_id }; + let id_32: string; + export { id_32 as id }; + let type_15: number; + export { type_15 as type }; + let content_3: string; + export { content_3 as content }; + let channel_id_10: string; + export { channel_id_10 as channel_id }; + export namespace author_1 { + let id_33: string; + export { id_33 as id }; + let username_9: string; + export { username_9 as username }; + let discriminator_9: string; + export { discriminator_9 as discriminator }; + let avatar_11: any; + export { avatar_11 as avatar }; + let bot_9: boolean; + export { bot_9 as bot }; + let global_name_1: string; + export { global_name_1 as global_name }; + } + export { author_1 as author }; + let attachments_1: any[]; + export { attachments_1 as attachments }; + let embeds_1: any[]; + export { embeds_1 as embeds }; + let mentions_1: any[]; + export { mentions_1 as mentions }; + let mention_roles_1: any[]; + export { mention_roles_1 as mention_roles }; + let mention_channels_1: any[]; + export { mention_channels_1 as mention_channels }; + let pinned_1: boolean; + export { pinned_1 as pinned }; + let mention_everyone_1: boolean; + export { mention_everyone_1 as mention_everyone }; + export let tts: boolean; + export let timestamp: string; + let edited_timestamp_1: any; + export { edited_timestamp_1 as edited_timestamp }; + let flags_10: number; + export { flags_10 as flags }; + } + export { message_1 as message }; + let token_3: string; + export { token_3 as token }; + let version_3: number; + export { version_3 as version }; + } + namespace REACTION { + let user_id_1: string; + export { user_id_1 as user_id }; + let message_id_1: string; + export { message_id_1 as message_id }; + export namespace emoji { + let id_34: any; + export { id_34 as id }; + let name_12: string; + export { name_12 as name }; + } + let channel_id_11: string; + export { channel_id_11 as channel_id }; + let guild_id_13: string; + export { guild_id_13 as guild_id }; + export namespace member_4 { + export namespace user_6 { + let id_35: string; + export { id_35 as id }; + let username_10: string; + export { username_10 as username }; + let discriminator_10: string; + export { discriminator_10 as discriminator }; + let avatar_12: any; + export { avatar_12 as avatar }; + let bot_10: boolean; + export { bot_10 as bot }; + let system_7: boolean; + export { system_7 as system }; + let mfa_enabled_7: boolean; + export { mfa_enabled_7 as mfa_enabled }; + let locale_7: string; + export { locale_7 as locale }; + let verified_7: boolean; + export { verified_7 as verified }; + let email_7: any; + export { email_7 as email }; + let flags_11: number; + export { flags_11 as flags }; + let premium_type_7: number; + export { premium_type_7 as premium_type }; + let public_flags_7: number; + export { public_flags_7 as public_flags }; + } + export { user_6 as user }; + let roles_7: any[]; + export { roles_7 as roles }; + let joined_at_7: string; + export { joined_at_7 as joined_at }; + let premium_since_6: any; + export { premium_since_6 as premium_since }; + let deaf_6: boolean; + export { deaf_6 as deaf }; + let mute_6: boolean; + export { mute_6 as mute }; + let pending_6: boolean; + export { pending_6 as pending }; + let permissions_7: string; + export { permissions_7 as permissions }; + } + export { member_4 as member }; + export let message_author_id: string; + export let burst: boolean; + let type_16: number; + export { type_16 as type }; + } + namespace SLASH_COMMAND { + let id_36: string; + export { id_36 as id }; + let type_17: number; + export { type_17 as type }; + export namespace data_4 { + let name_13: string; + export { name_13 as name }; + let description_1: string; + export { description_1 as description }; + let options_3: any[]; + export { options_3 as options }; + } + export { data_4 as data }; + let guild_id_14: string; + export { guild_id_14 as guild_id }; + let channel_id_12: string; + export { channel_id_12 as channel_id }; + export namespace member_5 { + export namespace user_7 { + let id_37: string; + export { id_37 as id }; + let username_11: string; + export { username_11 as username }; + let discriminator_11: string; + export { discriminator_11 as discriminator }; + let avatar_13: any; + export { avatar_13 as avatar }; + let bot_11: boolean; + export { bot_11 as bot }; + let system_8: boolean; + export { system_8 as system }; + let mfa_enabled_8: boolean; + export { mfa_enabled_8 as mfa_enabled }; + let locale_8: string; + export { locale_8 as locale }; + let verified_8: boolean; + export { verified_8 as verified }; + let email_8: any; + export { email_8 as email }; + let flags_12: number; + export { flags_12 as flags }; + let premium_type_8: number; + export { premium_type_8 as premium_type }; + let public_flags_8: number; + export { public_flags_8 as public_flags }; + } + export { user_7 as user }; + let roles_8: any[]; + export { roles_8 as roles }; + let joined_at_8: string; + export { joined_at_8 as joined_at }; + let premium_since_7: any; + export { premium_since_7 as premium_since }; + let deaf_7: boolean; + export { deaf_7 as deaf }; + let mute_7: boolean; + export { mute_7 as mute }; + let pending_7: boolean; + export { pending_7 as pending }; + let permissions_8: string; + export { permissions_8 as permissions }; + } + export { member_5 as member }; + let token_4: string; + export { token_4 as token }; + let version_4: number; + export { version_4 as version }; + } + namespace STICKER { + let id_38: string; + export { id_38 as id }; + let name_14: string; + export { name_14 as name }; + let tags_1: string; + export { tags_1 as tags }; + let type_18: number; + export { type_18 as type }; + export let format_type: number; + let description_2: string; + export { description_2 as description }; + export let asset: string; + export let pack_id: string; + export let sort_value: number; + } + namespace USER { + let id_39: string; + export { id_39 as id }; + let username_12: string; + export { username_12 as username }; + let discriminator_12: string; + export { discriminator_12 as discriminator }; + let avatar_14: string; + export { avatar_14 as avatar }; + let bot_12: boolean; + export { bot_12 as bot }; + let system_9: boolean; + export { system_9 as system }; + let mfa_enabled_9: boolean; + export { mfa_enabled_9 as mfa_enabled }; + let locale_9: string; + export { locale_9 as locale }; + let verified_9: boolean; + export { verified_9 as verified }; + let email_9: any; + export { email_9 as email }; + let flags_13: number; + export { flags_13 as flags }; + let premium_type_9: number; + export { premium_type_9 as premium_type }; + let public_flags_9: number; + export { public_flags_9 as public_flags }; + let global_name_2: string; + export { global_name_2 as global_name }; + } + namespace VOICE_STATE { + let channel_id_13: string; + export { channel_id_13 as channel_id }; + let user_id_2: string; + export { user_id_2 as user_id }; + export let session_id: string; + let deaf_8: boolean; + export { deaf_8 as deaf }; + let mute_8: boolean; + export { mute_8 as mute }; + export let self_deaf: boolean; + export let self_mute: boolean; + export let suppress: boolean; + export let self_stream: boolean; + export let self_video: boolean; + export let request_to_speak_timestamp: string; + export let joined: number; + } + namespace SCHEDULED_EVENT { + let id_40: string; + export { id_40 as id }; + let guild_id_15: string; + export { guild_id_15 as guild_id }; + let channel_id_14: string; + export { channel_id_14 as channel_id }; + export let creator_id: string; + let name_15: string; + export { name_15 as name }; + let description_3: string; + export { description_3 as description }; + export let scheduled_start_time: string; + export let scheduled_end_time: string; + export let privacy_level: number; + export let status: number; + export let entity_type: number; + export let entity_id: string; + export namespace entity_metadata { + let location: any; + } + export namespace creator { + let id_41: string; + export { id_41 as id }; + let username_13: string; + export { username_13 as username }; + let discriminator_13: string; + export { discriminator_13 as discriminator }; + let avatar_15: any; + export { avatar_15 as avatar }; + let bot_13: boolean; + export { bot_13 as bot }; + let system_10: boolean; + export { system_10 as system }; + let mfa_enabled_10: boolean; + export { mfa_enabled_10 as mfa_enabled }; + let locale_10: string; + export { locale_10 as locale }; + let verified_10: boolean; + export { verified_10 as verified }; + let email_10: any; + export { email_10 as email }; + let flags_14: number; + export { flags_14 as flags }; + let premium_type_10: number; + export { premium_type_10 as premium_type }; + let public_flags_10: number; + export { public_flags_10 as public_flags }; + } + export let user_count: number; + export let image: string; + } + namespace SCHEDULED_EVENT_EXTERNAL { + let id_42: string; + export { id_42 as id }; + let guild_id_16: string; + export { guild_id_16 as guild_id }; + let channel_id_15: string; + export { channel_id_15 as channel_id }; + let creator_id_1: string; + export { creator_id_1 as creator_id }; + let name_16: string; + export { name_16 as name }; + let description_4: string; + export { description_4 as description }; + let scheduled_start_time_1: string; + export { scheduled_start_time_1 as scheduled_start_time }; + let scheduled_end_time_1: string; + export { scheduled_end_time_1 as scheduled_end_time }; + let privacy_level_1: number; + export { privacy_level_1 as privacy_level }; + let status_1: number; + export { status_1 as status }; + let entity_type_1: number; + export { entity_type_1 as entity_type }; + let entity_id_1: string; + export { entity_id_1 as entity_id }; + export namespace entity_metadata_1 { + let location_1: string; + export { location_1 as location }; + } + export { entity_metadata_1 as entity_metadata }; + export namespace creator_1 { + let id_43: string; + export { id_43 as id }; + let username_14: string; + export { username_14 as username }; + let discriminator_14: string; + export { discriminator_14 as discriminator }; + let avatar_16: any; + export { avatar_16 as avatar }; + let bot_14: boolean; + export { bot_14 as bot }; + let system_11: boolean; + export { system_11 as system }; + let mfa_enabled_11: boolean; + export { mfa_enabled_11 as mfa_enabled }; + let locale_11: string; + export { locale_11 as locale }; + let verified_11: boolean; + export { verified_11 as verified }; + let email_11: any; + export { email_11 as email }; + let flags_15: number; + export { flags_15 as flags }; + let premium_type_11: number; + export { premium_type_11 as premium_type }; + let public_flags_11: number; + export { public_flags_11 as public_flags }; + } + export { creator_1 as creator }; + let user_count_1: number; + export { user_count_1 as user_count }; + let image_1: string; + export { image_1 as image }; + } + namespace POLL { + let question_1: string; + export { question_1 as question }; + export let answers: { + answer_id: number; + poll_media: { + text: string; + emoji: { + id: string; + name: string; + }; + }; + }[]; + let expiry_1: string; + export { expiry_1 as expiry }; + export let allow_multiselect: boolean; + export let layout_type: number; + export namespace results { + let is_finalized: boolean; + let answer_counts: { + id: number; + count: number; + me_voted: boolean; + }[]; + } + } + namespace PERMISSION_OVERWRITE { + let id_44: string; + export { id_44 as id }; + let type_19: number; + export { type_19 as type }; + export let allow: string; + export let deny: string; + } + namespace FOLLOWED_CHANNEL { + let channel_id_16: string; + export { channel_id_16 as channel_id }; + let webhook_id_1: string; + export { webhook_id_1 as webhook_id }; + } + namespace WEBHOOK { + let id_45: string; + export { id_45 as id }; + let type_20: number; + export { type_20 as type }; + let guild_id_17: string; + export { guild_id_17 as guild_id }; + let channel_id_17: string; + export { channel_id_17 as channel_id }; + let name_17: string; + export { name_17 as name }; + let avatar_17: any; + export { avatar_17 as avatar }; + let application_id_3: any; + export { application_id_3 as application_id }; + export namespace user_8 { + let id_46: string; + export { id_46 as id }; + let username_15: string; + export { username_15 as username }; + let discriminator_15: string; + export { discriminator_15 as discriminator }; + let avatar_18: any; + export { avatar_18 as avatar }; + let bot_15: boolean; + export { bot_15 as bot }; + let global_name_3: string; + export { global_name_3 as global_name }; + } + export { user_8 as user }; + } + namespace BAN { + let reason_1: string; + export { reason_1 as reason }; + export namespace user_9 { + let id_47: string; + export { id_47 as id }; + let username_16: string; + export { username_16 as username }; + let discriminator_16: string; + export { discriminator_16 as discriminator }; + let avatar_19: any; + export { avatar_19 as avatar }; + let global_name_4: string; + export { global_name_4 as global_name }; + let bot_16: boolean; + export { bot_16 as bot }; + } + export { user_9 as user }; + } +} +export namespace TEST_CLIENTS { + function ALL_CACHES_ENABLED(): Client; + function NO_CACHES_ENABLED(): Client; +} +export namespace TEST_GUILDS { + export function ALL_CACHES_ENABLED_1(client: any): Guild; + export { ALL_CACHES_ENABLED_1 as ALL_CACHES_ENABLED }; + export function NO_CACHES_ENABLED_1(client: any): Guild; + export { NO_CACHES_ENABLED_1 as NO_CACHES_ENABLED }; +} +export namespace TEST_CHANNELS { + function TEXT_CHANNEL_ALL_CACHES_ENABLED(client: any): TextChannel; + function TEXT_CHANNEL_2_ALL_CACHES_ENABLED(client: any): TextChannel; + function VOICE_CHANNEL_ALL_CACHES_ENABLED(client: any): VoiceChannel; + function CATEGORY_CHANNEL_ALL_CACHES_ENABLED(client: any): CategoryChannel; +} +export namespace TEST_MEMBERS { + export function CLIENT_MEMBER_1(client: any): Member; + export { CLIENT_MEMBER_1 as CLIENT_MEMBER }; + export function THREAD_OWNER_MEMBER(client: any): Member; + export function GUILD_OWNER_MEMBER(client: any): Member; + export function GENERIC_MEMBER(client: any): Member; + export function VOICE_STATE_MEMBER(client: any): Member; +} +export namespace TEST_MESSAGES { + function GENERIC_MESSAGE(client: any): Message; +} +export namespace TEST_ROLES { + function GENERIC_ADMIN_ROLE(client: any): Role; +} +export namespace TEST_SCHEDULED_EVENTS { + function GENERIC_SCHEDULED_EVENT(client: any): ScheduledEvent; + function EXTERNAL_GENERIC_SCHEDULED_EVENT(client: any): ScheduledEvent; +} +import Client from "./Client.js"; +import Guild from "./structures/Guild.js"; +import TextChannel from "./structures/TextChannel.js"; +import VoiceChannel from "./structures/VoiceChannel.js"; +import CategoryChannel from "./structures/CategoryChannel.js"; +import { Member } from "./structures.js"; +import { Message } from "./structures.js"; +import { Role } from "./structures.js"; +import { ScheduledEvent } from "./structures.js"; +//# sourceMappingURL=testData.d.ts.map \ No newline at end of file diff --git a/dist/src/testData.d.ts.map b/dist/src/testData.d.ts.map new file mode 100644 index 00000000..1a858082 --- /dev/null +++ b/dist/src/testData.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"testData.d.ts","sourceRoot":"","sources":["../../src/testData.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA86BsB,sCAiBnB;IACkB,qCAiBlB;;;IAImB,yDAYnB;;IACkB,wDAYlB;;;;IAIgC,mEAKhC;IACkC,qEAKlC;IACiC,qEAKjC;IACoC,2EAKpC;;;IAIc,qDAMd;;IACoB,yDAMpB;IACmB,wDAMnB;IACe,oDAMf;IACmB,wDAMnB;;;IAIgB,+CAMhB;;;IAImB,+CAKnB;;;IAIwB,8DAOxB;IACiC,uEAOjC;;mBArlCgB,aAAa;kBAKd,uBAAuB;wBACjB,6BAA6B;yBAE5B,8BAA8B;4BAJ3B,iCAAiC;uBADP,iBAAiB;wBAAjB,iBAAiB;qBAAjB,iBAAiB;+BAAjB,iBAAiB"} \ No newline at end of file diff --git a/dist/src/util.d.ts b/dist/src/util.d.ts new file mode 100644 index 00000000..6fce7c11 --- /dev/null +++ b/dist/src/util.d.ts @@ -0,0 +1,20 @@ +export { default as ActionRow } from "./util/builder/actionRowBuilder.js"; +export { default as Button } from "./util/builder/buttonBuilder.js"; +export { default as checkMemberPermissions } from "./util/discord/checkMemberPermissions.js"; +export { default as checkPermission } from "./util/discord/checkPermission.js"; +export { default as Command } from "./util/builder/commandBuilder.js"; +export { default as CommandChoice } from "./util/builder/commandChoiceBuilder.js"; +export { default as CommandOption } from "./util/builder/commandOptionBuilder.js"; +export { default as decryptText } from "./util/general/decryptText.js"; +export { default as deepCompare } from "./util/general/deepCompare.js"; +export { default as Dropdown } from "./util/builder/dropdownBuilder.js"; +export { default as DropdownOption } from "./util/builder/dropdownOption.js"; +export { default as Embed } from "./util/builder/embedBuilder.js"; +export { default as encryptText } from "./util/general/encryptText.js"; +export { default as getTimestamp } from "./util/discord/getTimestampFromSnowflake.js"; +export { default as hexToInt } from "./util/general/hexToInt.js"; +export { default as MessageComponents } from "./util/builder/messageComponents.js"; +export { default as resolveEmoji } from "./util/discord/resolveEmoji.js"; +export { default as TextInput } from "./util/builder/textInputBuilder.js"; +export { default as verifyMessageLink } from "./util/discord/verifyMessageLink.js"; +//# sourceMappingURL=util.d.ts.map \ No newline at end of file diff --git a/dist/src/util.d.ts.map b/dist/src/util.d.ts.map new file mode 100644 index 00000000..ebb8aa39 --- /dev/null +++ b/dist/src/util.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/util.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/src/util/art/gluon.d.ts b/dist/src/util/art/gluon.d.ts new file mode 100644 index 00000000..2e688ac0 --- /dev/null +++ b/dist/src/util/art/gluon.d.ts @@ -0,0 +1,2 @@ +export default function gluon(): string; +//# sourceMappingURL=gluon.d.ts.map \ No newline at end of file diff --git a/dist/src/util/art/gluon.d.ts.map b/dist/src/util/art/gluon.d.ts.map new file mode 100644 index 00000000..7ad2083c --- /dev/null +++ b/dist/src/util/art/gluon.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"gluon.d.ts","sourceRoot":"","sources":["../../../../src/util/art/gluon.js"],"names":[],"mappings":"AAEA,wCAUC"} \ No newline at end of file diff --git a/dist/src/util/art/quark.d.ts b/dist/src/util/art/quark.d.ts new file mode 100644 index 00000000..cae2125c --- /dev/null +++ b/dist/src/util/art/quark.d.ts @@ -0,0 +1,2 @@ +export default function quark(): string; +//# sourceMappingURL=quark.d.ts.map \ No newline at end of file diff --git a/dist/src/util/art/quark.d.ts.map b/dist/src/util/art/quark.d.ts.map new file mode 100644 index 00000000..a4892b1d --- /dev/null +++ b/dist/src/util/art/quark.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"quark.d.ts","sourceRoot":"","sources":["../../../../src/util/art/quark.js"],"names":[],"mappings":"AAAA,wCAmCC"} \ No newline at end of file diff --git a/dist/src/util/builder/actionRowBuilder.d.ts b/dist/src/util/builder/actionRowBuilder.d.ts new file mode 100644 index 00000000..6d44fad3 --- /dev/null +++ b/dist/src/util/builder/actionRowBuilder.d.ts @@ -0,0 +1,22 @@ +export default ActionRow; +/** + * Helps to construct an action row for a message. + */ +declare class ActionRow { + type: number; + components: any[]; + /** + * Adds a component to the action row. + * @param {Button | Dropdown} component A component to add to the action row. + * @returns {ActionRow} + */ + addComponent(component: Button | Dropdown): ActionRow; + /** + * Returns the correct Discord format for an action row. + * @returns {Object} + */ + toJSON(format: any, { suppressValidation }?: { + suppressValidation?: false; + }): any; +} +//# sourceMappingURL=actionRowBuilder.d.ts.map \ No newline at end of file diff --git a/dist/src/util/builder/actionRowBuilder.d.ts.map b/dist/src/util/builder/actionRowBuilder.d.ts.map new file mode 100644 index 00000000..00c05eb1 --- /dev/null +++ b/dist/src/util/builder/actionRowBuilder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"actionRowBuilder.d.ts","sourceRoot":"","sources":["../../../../src/util/builder/actionRowBuilder.js"],"names":[],"mappings":";AAMA;;GAEG;AACH;IAKI,aAAsC;IACtC,kBAAoB;IAGtB;;;;OAIG;IACH,wBAHW,MAAM,GAAG,QAAQ,GACf,SAAS,CAMrB;IAED;;;OAGG;IACH;;YAyBC;CACF"} \ No newline at end of file diff --git a/dist/src/util/builder/buttonBuilder.d.ts b/dist/src/util/builder/buttonBuilder.d.ts new file mode 100644 index 00000000..596fadbe --- /dev/null +++ b/dist/src/util/builder/buttonBuilder.d.ts @@ -0,0 +1,60 @@ +export default Button; +/** + * Helps to construct a button for a message. + * @see {@link https://discord.com/developers/docs/interactions/message-components#button-object-button-structure} + */ +declare class Button { + type: number; + /** + * Sets the text on the button. + * @param {String} label The text to display on the button. + * @returns {Button} + */ + setLabel(label: string): Button; + label: string; + /** + * Sets the emoji to be displayed on the button. + * @param {String} emoji The emoji to display on the button. For a custom emoji, it should be in the format "<:bitcoin:844240546246950922>". + * @returns {Button} + */ + setEmoji(emoji: string): Button; + emoji: any; + /** + * Sets the style of the button. + * @param {Number} style The button style. + * @returns {Button} + * @see {@link https://discord.com/developers/docs/interactions/message-components#button-object-button-styles} + */ + setStyle(style: number): Button; + style: number; + /** + * Set the custom id of the button. + * @param {String} id The custom id of the button. + * @returns {Button} + * @see {@link https://discord.com/developers/docs/interactions/message-components#custom-id} + */ + setCustomID(id: string): Button; + custom_id: string; + /** + * Sets the url of the button. + * @param {String} url The url for a link button. + * @returns {Button} + */ + setURL(url: string): Button; + url: string; + /** + * Disables the button from being clickable. + * @param {Boolean} disabled Whether this button should be displayed as disabled. + * @returns {Button} + */ + setDisabled(disabled: boolean): Button; + disabled: boolean; + /** + * Returns the correct Discord format for a button. + * @returns {Object} + */ + toJSON(format: any, { suppressValidation }?: { + suppressValidation?: false; + }): any; +} +//# sourceMappingURL=buttonBuilder.d.ts.map \ No newline at end of file diff --git a/dist/src/util/builder/buttonBuilder.d.ts.map b/dist/src/util/builder/buttonBuilder.d.ts.map new file mode 100644 index 00000000..405aec7e --- /dev/null +++ b/dist/src/util/builder/buttonBuilder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"buttonBuilder.d.ts","sourceRoot":"","sources":["../../../../src/util/builder/buttonBuilder.js"],"names":[],"mappings":";AASA;;;GAGG;AACH;IAKI,aAAkC;IAGpC;;;;OAIG;IACH,yBAFa,MAAM,CAWlB;IANC,cAGW;IAKb;;;;OAIG;IACH,yBAFa,MAAM,CASlB;IANC,WAAgC;IAQlC;;;;;OAKG;IACH,yBAHa,MAAM,CASlB;IAHC,cAAkB;IAKpB;;;;;OAKG;IACH,yBAHa,MAAM,CAiBlB;IAHC,kBAAmB;IAKrB;;;;OAIG;IACH,qBAFa,MAAM,CAMlB;IAHC,YAAc;IAKhB;;;;OAIG;IACH,gCAFa,MAAM,CAMlB;IAHC,kBAAwB;IAK1B;;;OAGG;IACH;;YAuEC;CACF"} \ No newline at end of file diff --git a/dist/src/util/builder/commandBuilder.d.ts b/dist/src/util/builder/commandBuilder.d.ts new file mode 100644 index 00000000..0c78d8bb --- /dev/null +++ b/dist/src/util/builder/commandBuilder.d.ts @@ -0,0 +1,72 @@ +export default Command; +/** + * Structure for a command. + * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command} + */ +declare class Command { + type: number; + contexts: number[]; + options: any[]; + defaultLocale: string; + /** + * Sets the name of the command. + * @param {String | Object} name The name of the command or an object of names for localisation. + * @returns {Command} + * @see {@link https://discord.com/developers/docs/interactions/application-commands#localization} + */ + setName(name: string | any): Command; + name: any; + name_localizations: any; + /** + * Sets the command type. + * @param {Number} type The command type. + * @returns {Command} + * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-types} + */ + setType(type: number): Command; + /** + * Sets the description of the command. + * @param {String | Object} description The description of the command, or an object of descriptions for localisation. + * @returns {Command} + * @see {@link https://discord.com/developers/docs/interactions/application-commands#localization} + */ + setDescription(description: string | any): Command; + description: any; + description_localizations: any; + /** + * Sets the permission needed to use the command. + * @param {String} permissions The permissions required to be able to use this command. + * @returns {Command} + */ + setDefaultMemberPermissions(permissions: string): Command; + default_member_permissions: string; + /** + * Sets whether this command is NSFW. + * @param {Boolean} nsfw Whether this command is NSFW. + * @returns {Command} + */ + setNsfw(nsfw: boolean): Command; + nsfw: boolean; + /** + * Adds an option to the command. + * @param {CommandOption} option Adds an option to the command. + * @returns {Command} + */ + addOption(option: CommandOption): Command; + /** + * Sets the default locale for localisation. + * @param {String?} locale Sets the default locale for localisation. + * @returns {Command} + * @see {@link https://discord.com/developers/docs/reference#locales} + */ + setDefaultLocale(locale: string | null): Command; + /** + * Returns the correct Discord format for a command. + * @returns {Object} + */ + toJSON(format: any, { suppressValidation }?: { + suppressValidation?: false; + }): any; +} +import CommandOption from "./commandOptionBuilder.js"; +//# sourceMappingURL=commandBuilder.d.ts.map \ No newline at end of file diff --git a/dist/src/util/builder/commandBuilder.d.ts.map b/dist/src/util/builder/commandBuilder.d.ts.map new file mode 100644 index 00000000..b00e7d86 --- /dev/null +++ b/dist/src/util/builder/commandBuilder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"commandBuilder.d.ts","sourceRoot":"","sources":["../../../../src/util/builder/commandBuilder.js"],"names":[],"mappings":";AAOA;;;GAGG;AACH;IAKI,aAAgD;IAEhD,mBAAmB;IAEnB,eAAiB;IAEjB,sBAA4B;IAG9B;;;;;OAKG;IACH,cAJW,YAAe,GACb,OAAO,CAenB;IARG,UAAoC;IAIpC,wBAA8B;IAMlC;;;;;OAKG;IACH,uBAHa,OAAO,CAUnB;IAED;;;;;OAKG;IACH,4BAJW,YAAe,GACb,OAAO,CAgBnB;IARG,iBAAkD;IAIlD,+BAA4C;IAMhD;;;;OAIG;IACH,kDAFa,OAAO,CAWnB;IAHC,mCAAqD;IAKvD;;;;OAIG;IACH,wBAFa,OAAO,CASnB;IAHC,cAAgB;IAKlB;;;;OAIG;IACH,kBAHW,aAAa,GACX,OAAO,CAanB;IAED;;;;;OAKG;IACH,yBAJW,aAAO,GACL,OAAO,CAYnB;IAED;;;OAGG;IACH;;YA2GC;CACF;0BA7PyB,2BAA2B"} \ No newline at end of file diff --git a/dist/src/util/builder/commandChoiceBuilder.d.ts b/dist/src/util/builder/commandChoiceBuilder.d.ts new file mode 100644 index 00000000..a5fb0e7a --- /dev/null +++ b/dist/src/util/builder/commandChoiceBuilder.d.ts @@ -0,0 +1,38 @@ +export default CommandChoice; +/** + * Helps to create a choice for a command. + * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-choice-structure} + */ +declare class CommandChoice { + defaultLocale: string; + /** + * Sets the name of the choice. + * @param {String | Object} name Sets the name of the choice, or an object of names for localisation. + * @returns {CommandChoice} + */ + setName(name: string | any): CommandChoice; + name: any; + name_localizations: any; + /** + * Sets the value of the choice. + * @param {String} value Value of the choice. + * @returns {CommandChoice} + */ + setValue(value: string): CommandChoice; + value: string; + /** + * Sets the default locale for localisation. + * @param {String?} locale Sets the default locale for localisation. + * @returns {Command} + * @see {@link https://discord.com/developers/docs/reference#locales} + */ + setDefaultLocale(locale: string | null): Command; + /** + * Returns the correct Discord format for a command choice. + * @returns {Object} + */ + toJSON(format: any, { suppressValidation }?: { + suppressValidation?: false; + }): any; +} +//# sourceMappingURL=commandChoiceBuilder.d.ts.map \ No newline at end of file diff --git a/dist/src/util/builder/commandChoiceBuilder.d.ts.map b/dist/src/util/builder/commandChoiceBuilder.d.ts.map new file mode 100644 index 00000000..848966ba --- /dev/null +++ b/dist/src/util/builder/commandChoiceBuilder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"commandChoiceBuilder.d.ts","sourceRoot":"","sources":["../../../../src/util/builder/commandChoiceBuilder.js"],"names":[],"mappings":";AAEA;;;GAGG;AACH;IAKI,sBAA4B;IAG9B;;;;OAIG;IACH,cAHW,YAAe,GACb,aAAa,CAkCzB;IAfG,UAAoC;IAIpC,wBAA8B;IAalC;;;;OAIG;IACH,yBAFa,aAAa,CAczB;IAHC,cAAkB;IAKpB;;;;;OAKG;IACH,yBAJW,aAAO,GACL,OAAO,CASnB;IAED;;;OAGG;IACH;;YA8DC;CACF"} \ No newline at end of file diff --git a/dist/src/util/builder/commandOptionBuilder.d.ts b/dist/src/util/builder/commandOptionBuilder.d.ts new file mode 100644 index 00000000..fc761cc2 --- /dev/null +++ b/dist/src/util/builder/commandOptionBuilder.d.ts @@ -0,0 +1,112 @@ +export default CommandOption; +/** + * Helps to create a choice for a command. + * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-structure} + */ +declare class CommandOption { + choices: any[]; + options: any[]; + defaultLocale: string; + /** + * Sets the name of the option. + * @param {String | Object} name Sets the name of the option, or an object of names for localisation. + * @returns {CommandOption} + */ + setName(name: string | any): CommandOption; + name: any; + name_localizations: any; + /** + * Sets the option type. + * @param {Number} type The option type. + * @returns {Command} + * @see {@link https://discord.com/developers/docs/interactions/application-commands#application-command-object-application-command-option-type} + */ + setType(type: number): Command; + type: number; + /** + * Sets the description of the command choice. + * @param {String | Object} description The description of the command choice, or an object of descriptions for localisation. + * @returns {Command} + * @see {@link https://discord.com/developers/docs/interactions/application-commands#localization} + */ + setDescription(description: string | any): Command; + description: any; + description_localizations: any; + /** + * Sets whether the option is required. + * @param {Boolean} isRequired Whether the option is required. + * @returns {CommandOption} + */ + setRequired(isRequired: boolean): CommandOption; + required: boolean; + /** + * Adds a choice to the option. + * @param {CommandChoice} choice Adds a choice to the option. + * @returns {CommandOption} + */ + addChoice(choice: CommandChoice): CommandOption; + /** + * Adds an option to this option. + * @param {CommandOption} option Adds an option to this option. + * @returns {CommandOption} + */ + addOption(option: CommandOption): CommandOption; + /** + * Sets which channel types are selectable by the user. + * @param {Array} channelTypes An array of channel types to offer as a choice. + * @returns {CommandOption} + * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} + */ + setChannelTypes(channelTypes: Array): CommandOption; + channel_types: number[]; + /** + * Sets the minimum value the user may enter. + * @param {Number} value The minimum number value that the user may enter. + * @returns {CommandOption} + */ + setMinValue(value: number): CommandOption; + min_value: number; + /** + * Sets the maximum value the user may enter. + * @param {Number} value The maximum number value that the user may enter. + * @returns {CommandOption} + */ + setMaxValue(value: number): CommandOption; + max_value: number; + /** + * Sets the minimum length the user may enter. + * @param {Number} length The minimum length that the user may enter. + * @returns {CommandOption} + */ + setMinLength(length: number): CommandOption; + min_length: number; + /** + * Sets the maximum length the user may enter. + * @param {Number} length The maximum length that the user may enter. + * @returns {CommandOption} + */ + setMaxLength(length: number): CommandOption; + max_length: number; + /** + * Sets whether autocomplete is enabled for this option. + * @param {Boolean} autocomplete Whether autocomplete is enabled for this option. + * @returns {CommandOption} + */ + setAutocomplete(autocomplete: boolean): CommandOption; + autocomplete: boolean; + /** + * Sets the default locale for localisation. + * @param {String?} locale Sets the default locale for localisation. + * @returns {Command} + * @see {@link https://discord.com/developers/docs/reference#locales} + */ + setDefaultLocale(locale: string | null): Command; + /** + * Returns the correct Discord format for a command option. + * @returns {Object} + */ + toJSON(format: any, { suppressValidation }?: { + suppressValidation?: false; + }): any; +} +//# sourceMappingURL=commandOptionBuilder.d.ts.map \ No newline at end of file diff --git a/dist/src/util/builder/commandOptionBuilder.d.ts.map b/dist/src/util/builder/commandOptionBuilder.d.ts.map new file mode 100644 index 00000000..8456e8e9 --- /dev/null +++ b/dist/src/util/builder/commandOptionBuilder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"commandOptionBuilder.d.ts","sourceRoot":"","sources":["../../../../src/util/builder/commandOptionBuilder.js"],"names":[],"mappings":";AAOA;;;GAGG;AACH;IAKI,eAAiB;IAEjB,eAAiB;IAEjB,sBAA4B;IAG9B;;;;OAIG;IACH,cAHW,YAAe,GACb,aAAa,CAgCzB;IAfG,UAAoC;IAIpC,wBAA8B;IAalC;;;;;OAKG;IACH,uBAHa,OAAO,CAUnB;IAHC,aAAgB;IAKlB;;;;;OAKG;IACH,4BAJW,YAAe,GACb,OAAO,CAsCnB;IAfG,iBAAkD;IAIlD,+BAA4C;IAahD;;;;OAIG;IACH,kCAFa,aAAa,CAWzB;IAHC,kBAA0B;IAK5B;;;;OAIG;IACH,kBAHW,aAAa,GACX,aAAa,CAczB;IAED;;;;OAIG;IACH,kBAHW,aAAa,GACX,aAAa,CAazB;IAED;;;;;OAKG;IACH,8BAJW,KAAK,QAAQ,GACX,aAAa,CAiBzB;IAHC,wBAAiC;IAKnC;;;;OAIG;IACH,4BAFa,aAAa,CASzB;IAHC,kBAAsB;IAKxB;;;;OAIG;IACH,4BAFa,aAAa,CASzB;IAHC,kBAAsB;IAKxB;;;;OAIG;IACH,8BAFa,aAAa,CASzB;IAHC,mBAAwB;IAK1B;;;;OAIG;IACH,8BAFa,aAAa,CASzB;IAHC,mBAAwB;IAK1B;;;;OAIG;IACH,wCAFa,aAAa,CAWzB;IAHC,sBAAgC;IAKlC;;;;;OAKG;IACH,yBAJW,aAAO,GACL,OAAO,CASnB;IAED;;;OAGG;IACH;;YAoLC;CACF"} \ No newline at end of file diff --git a/dist/src/util/builder/dropdownBuilder.d.ts b/dist/src/util/builder/dropdownBuilder.d.ts new file mode 100644 index 00000000..762d790b --- /dev/null +++ b/dist/src/util/builder/dropdownBuilder.d.ts @@ -0,0 +1,82 @@ +export default Dropdown; +/** + * Helps to create a dropdown message component. + * @see {@link https://discord.com/developers/docs/interactions/message-components#select-menus} + */ +declare class Dropdown { + type: number; + options: any[]; + default_values: any[]; + /** + * Sets the option type. + * @param {Number} type The option type. + * @returns {Dropdown} + * @see {@link https://discord.com/developers/docs/interactions/message-components#component-object-component-types} + */ + setType(type: number): Dropdown; + /** + * Set the custom id of the dropdown. + * @param {String} id The custom id of the dropdown. + * @returns {Dropdown} + * @see {@link https://discord.com/developers/docs/interactions/message-components#custom-id} + */ + setCustomID(id: string): Dropdown; + custom_id: string; + /** + * Adds an option to the dropdown. + * @param {DropdownOption} option Adds an option to the dropdown. + * @returns {Dropdown} + */ + addOption(option: DropdownOption): Dropdown; + /** + * Sets which channel types are selectable by the user. + * @param {Array} channelTypes An array of channel types to offer as a choice. + * @returns {CommandOption} + * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} + */ + addChannelTypes(channelTypes: Array): CommandOption; + channel_types: number[]; + /** + * Sets the placeholder text. + * @param {String} placeholder Placeholder text if nothing is selected. + * @returns {Dropdown} + */ + setPlaceholder(placeholder: string): Dropdown; + placeholder: string; + /** + * Sets the minimum value the user may enter. + * @param {Number} value The minimum number value that the user may enter. + * @returns {CommandOption} + */ + setMinValue(value: number): CommandOption; + min_values: number; + /** + * Sets the maximum value the user may enter. + * @param {Number} value The maximum number value that the user may enter. + * @returns {Dropdown} + */ + setMaxValue(value: number): Dropdown; + max_values: number; + /** + * Disables the dropdown from being clickable. + * @param {Boolean} disabled Whether this dropdown should be displayed as disabled. + * @returns {Dropdown} + */ + setDisabled(isDisabled: any): Dropdown; + disabled: boolean; + /** + * Adds a default option to the dropdown. + * @param {Object} option The default option to add to the dropdown. + * @returns {Dropdown} + */ + addDefaultOption(option: any): Dropdown; + /** + * Returns the correct Discord format for a dropdown. + * @returns {Object} + */ + toJSON(format: any, { suppressValidation }?: { + suppressValidation?: false; + }): any; +} +import DropdownOption from "./dropdownOption.js"; +//# sourceMappingURL=dropdownBuilder.d.ts.map \ No newline at end of file diff --git a/dist/src/util/builder/dropdownBuilder.d.ts.map b/dist/src/util/builder/dropdownBuilder.d.ts.map new file mode 100644 index 00000000..0bc905fe --- /dev/null +++ b/dist/src/util/builder/dropdownBuilder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dropdownBuilder.d.ts","sourceRoot":"","sources":["../../../../src/util/builder/dropdownBuilder.js"],"names":[],"mappings":";AASA;;;GAGG;AACH;IAKI,aAAuC;IACvC,eAAiB;IACjB,sBAAwB;IAG1B;;;;;OAKG;IACH,uBAHa,QAAQ,CAUpB;IAED;;;;;OAKG;IACH,yBAHa,QAAQ,CAcpB;IAHC,kBAAmB;IAKrB;;;;OAIG;IACH,kBAHW,cAAc,GACZ,QAAQ,CAcpB;IAED;;;;;OAKG;IACH,8BAJW,KAAK,QAAQ,GACX,aAAa,CAazB;IAHC,wBAAiC;IAKnC;;;;OAIG;IACH,qCAFa,QAAQ,CAYpB;IANC,oBAGiB;IAKnB;;;;OAIG;IACH,4BAFa,aAAa,CAiBzB;IAHC,mBAAuB;IAKzB;;;;OAIG;IACH,4BAFa,QAAQ,CAiBpB;IAHC,mBAAuB;IAKzB;;;;OAIG;IACH,8BAFa,QAAQ,CASpB;IAHC,kBAA0B;IAK5B;;;;OAIG;IACH,+BAFa,QAAQ,CAuBpB;IAED;;;OAGG;IACH;;YAyIC;CACF;2BA5U0B,qBAAqB"} \ No newline at end of file diff --git a/dist/src/util/builder/dropdownOption.d.ts b/dist/src/util/builder/dropdownOption.d.ts new file mode 100644 index 00000000..cdd672cd --- /dev/null +++ b/dist/src/util/builder/dropdownOption.d.ts @@ -0,0 +1,50 @@ +export default DropdownOption; +/** + * Helps to create a dropdown option. + * @see {@link https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-option-structure} + */ +declare class DropdownOption { + /** + * Sets the label. + * @param {String} label Sets the label. + * @returns {DropdownOption} + */ + setLabel(label: string): DropdownOption; + label: string; + /** + * Sets the value. + * @param {String} value Sets the value. + * @returns {DropdownOption} + */ + setValue(value: string): DropdownOption; + value: string; + /** + * Sets the description. + * @param {String} description Sets the description. + * @returns {DropdownOption} + */ + setDescription(description: string): DropdownOption; + description: string; + /** + * Sets the emoji to be displayed on the dropdown option. + * @param {String} emoji The emoji to display on the dropdown option. For a custom emoji, it should be in the format "<:bitcoin:844240546246950922>". + * @returns {DropdownOption} + */ + setEmoji(emoji: string): DropdownOption; + emoji: any; + /** + * Sets whether this is the default selected option. + * @param {Boolean} isDefault Whether this option should be selected by default. + * @returns {DropdownOption} + */ + setDefault(isDefault: boolean): DropdownOption; + default: boolean; + /** + * Returns the correct Discord format for a dropdown option. + * @returns {Object} + */ + toJSON(format: any, { suppressValidation }?: { + suppressValidation?: false; + }): any; +} +//# sourceMappingURL=dropdownOption.d.ts.map \ No newline at end of file diff --git a/dist/src/util/builder/dropdownOption.d.ts.map b/dist/src/util/builder/dropdownOption.d.ts.map new file mode 100644 index 00000000..aca7b84d --- /dev/null +++ b/dist/src/util/builder/dropdownOption.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dropdownOption.d.ts","sourceRoot":"","sources":["../../../../src/util/builder/dropdownOption.js"],"names":[],"mappings":";AAGA;;;GAGG;AACH;IACE;;;;OAIG;IACH,yBAFa,cAAc,CAY1B;IANC,cAGW;IAKb;;;;OAIG;IACH,yBAFa,cAAc,CAc1B;IAHC,cAAkB;IAKpB;;;;OAIG;IACH,qCAFa,cAAc,CAc1B;IANC,oBAGiB;IAKnB;;;;OAIG;IACH,yBAFa,cAAc,CAS1B;IANC,WAAgC;IAQlC;;;;OAIG;IACH,gCAFa,cAAc,CAM1B;IAHC,iBAAwB;IAK1B;;;OAGG;IACH;;YAoDC;CACF"} \ No newline at end of file diff --git a/dist/src/util/builder/embedBuilder.d.ts b/dist/src/util/builder/embedBuilder.d.ts new file mode 100644 index 00000000..74780ba3 --- /dev/null +++ b/dist/src/util/builder/embedBuilder.d.ts @@ -0,0 +1,155 @@ +export default Embed; +/** + * Helps to create an embed for a message. + * @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-structure} + */ +declare class Embed { + /** + * Creates an embed structure. + */ + constructor(data: any); + fields: any[]; + /** + * Sets the title of the embed. + * @param {String} title The title of the embed. + * @returns {Embed} + * @throws {TypeError} + * @method + * @public + */ + public setTitle(title: string): Embed; + title: string; + /** + * Sets the embed description. + * @param {String} text The description. + * @returns {Embed} + * @throws {TypeError} + * @method + * @public + */ + public setDescription(text: string): Embed; + description: string; + /** + * Sets the url of the embed. + * @param {String} url The url. + * @returns {Embed} + * @throws {TypeError} + * @method + * @public + */ + public setURL(url: string): Embed; + url: string; + /** + * Sets the timestamp displayed on the embed. + * @param {Number?} timestamp The UNIX timestamp. + * @returns {Embed} + * @method + * @public + */ + public setTimestamp(timestamp: number | null): Embed; + timestamp: number; + /** + * Sets the color of the embed. + * @param {String | Number} color The color. + * @returns {Embed} + * @throws {TypeError} + * @method + * @public + */ + public setColor(color: string | number): Embed; + color: number; + /** + * Sets the embed thumbnail image. + * @param {String} url The url of the thumbnail. + * @returns {Embed} + * @throws {TypeError} + * @method + * @public + */ + public setThumbnail(url: string): Embed; + thumbnail: { + url: string; + }; + /** + * Sets the embed footer. + * @param {String} text The footer text. + * @param {String?} icon The url of the footer icon. + * @returns {Embed} + * @throws {TypeError} + * @method + * @public + */ + public setFooter(text: string, icon: string | null): Embed; + footer: { + text: string; + }; + /** + * Sets the embed author info. + * @param {String?} name The embed author. + * @param {String?} url The url. + * @param {String?} icon_url The embed author image url. + * @returns {Embed} + * @throws {TypeError} + * @method + * @public + */ + public setAuthor(name: string | null, url: string | null, icon_url: string | null): Embed; + author: {}; + /** + * Adds a field to the embed. + * @param {String} name Sets the embed field name. + * @param {String} value Sets the embed field value. + * @param {Boolean?} inline Whether this field should be displayed inline. + * @returns {Embed} + * @throws {RangeError | TypeError} + * @method + * @public + */ + public addField(name: string, value: string, inline?: boolean | null): Embed; + /** + * Sets the embed image url. + * @param {String} url The image url. + * @returns {Embed} + * @method + * @public + */ + public setImage(url: string): Embed; + image: { + url: string; + }; + /** + * Sets the embed video url. + * @param {String} url The video url. + * @returns {Embed} + * @method + * @public + */ + public setVideo(url: string): Embed; + video: { + url: string; + }; + /** + * Returns the character count of the embed. + * @returns {Number} + * @readonly + * @public + */ + public readonly get characterCount(): number; + /** + * Converts the embed into string form. + * @returns {String} + * @method + * @public + */ + public toString(): string; + /** + * Returns the correct Discord format for an embed. + * @returns {Object} + * @method + * @public + */ + public toJSON(format: any, { suppressValidation }?: { + suppressValidation?: false; + }): any; +} +//# sourceMappingURL=embedBuilder.d.ts.map \ No newline at end of file diff --git a/dist/src/util/builder/embedBuilder.d.ts.map b/dist/src/util/builder/embedBuilder.d.ts.map new file mode 100644 index 00000000..b1ddfe47 --- /dev/null +++ b/dist/src/util/builder/embedBuilder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"embedBuilder.d.ts","sourceRoot":"","sources":["../../../../src/util/builder/embedBuilder.js"],"names":[],"mappings":";AAIA;;;GAGG;AACH;IACE;;OAEG;IACH,uBAoBC;IAnBC,cAAgB;IAqBlB;;;;;;;OAOG;IACH,gCALa,KAAK,CAcjB;IANC,cAGW;IAKb;;;;;;;OAOG;IACH,qCALa,KAAK,CAejB;IANC,oBAGU;IAKZ;;;;;;;OAOG;IACH,4BALa,KAAK,CAWjB;IAHC,YAAc;IAKhB;;;;;;OAMG;IACH,+BALW,aAAO,GACL,KAAK,CASjB;IAJgB,kBAAiC;IAMlD;;;;;;;OAOG;IACH,uBANW,eAAe,GACb,KAAK,CAejB;IAJG,cAA4B;IAMhC;;;;;;;OAOG;IACH,kCALa,KAAK,CAcjB;IALC;;MAEC;IAKH;;;;;;;;OAQG;IACH,qCANW,aAAO,GACL,KAAK,CAkBjB;IATC;;MAKC;IAMH;;;;;;;;;OASG;IACH,uBARW,aAAO,OACP,aAAO,YACP,aAAO,GACL,KAAK,CAoBjB;IAXC,WAAgB;IAalB;;;;;;;;;OASG;IACH,sDANW,cAAQ,GACN,KAAK,CA6BjB;IAED;;;;;;OAMG;IACH,8BAJa,KAAK,CAajB;IALC;;MAEC;IAKH;;;;;;OAMG;IACH,8BAJa,KAAK,CAajB;IALC;;MAEC;IAKH;;;;;OAKG;IACH,6CAcC;IAED;;;;;OAKG;IACH,0BAgBC;IAED;;;;;OAKG;IACH;;YAyJC;CACF"} \ No newline at end of file diff --git a/dist/src/util/builder/fileUpload.d.ts b/dist/src/util/builder/fileUpload.d.ts new file mode 100644 index 00000000..40baabd1 --- /dev/null +++ b/dist/src/util/builder/fileUpload.d.ts @@ -0,0 +1,52 @@ +export default FileUpload; +declare class FileUpload { + /** + * The name of the file. + * @param {String} name The name of the file. + * @returns {FileUpload} + */ + setName(name: string): FileUpload; + /** + * The stream of the file. + * @param {Stream} stream The stream of the file. + * @returns {FileUpload} + */ + setStream(stream: Stream): FileUpload; + /** + * The path of the file. + * @param {String} path The path of the file. + * @returns {FileUpload} + */ + setPath(path: string): FileUpload; + /** + * The name of the file. + * @type {String} + * @readonly + */ + readonly get name(): string; + /** + * The stream of the file. + * @type {Stream} + * @readonly + */ + readonly get stream(): Stream; + /** + * The path of the file. + * @type {String} + * @readonly + */ + readonly get attachment(): string; + toJSON(format: any, { suppressValidation }?: { + suppressValidation?: false; + }): { + name: any; + stream: any; + attachment?: undefined; + } | { + name: any; + attachment: any; + stream?: undefined; + }; + #private; +} +//# sourceMappingURL=fileUpload.d.ts.map \ No newline at end of file diff --git a/dist/src/util/builder/fileUpload.d.ts.map b/dist/src/util/builder/fileUpload.d.ts.map new file mode 100644 index 00000000..bbb3c1a6 --- /dev/null +++ b/dist/src/util/builder/fileUpload.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fileUpload.d.ts","sourceRoot":"","sources":["../../../../src/util/builder/fileUpload.js"],"names":[],"mappings":";AAEA;IAIE;;;;OAIG;IACH,uBAFa,UAAU,CAYtB;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACJ,UAAU,CAMtB;IAED;;;;OAIG;IACH,uBAFa,UAAU,CAQtB;IAED;;;;OAIG;IACH,4BAEC;IAED;;;;OAIG;IACH,8BAEC;IAED;;;;OAIG;IACH,kCAEC;IAED;;;;;;;;;;MA2BC;;CACF"} \ No newline at end of file diff --git a/dist/src/util/builder/messageComponents.d.ts b/dist/src/util/builder/messageComponents.d.ts new file mode 100644 index 00000000..11712429 --- /dev/null +++ b/dist/src/util/builder/messageComponents.d.ts @@ -0,0 +1,19 @@ +export default MessageComponents; +/** + * Structure for message components. + */ +declare class MessageComponents { + actionRows: any[]; + /** + * Adds an action row to the message. + * @param {ActionRow} actionRow Action row to add to the message. + * @returns {MessageComponents} + */ + addActionRow(actionRow: ActionRow): MessageComponents; + /** + * Returns the correct Discord format for message components. + * @returns {Object} + */ + toJSON(format: any): any; +} +//# sourceMappingURL=messageComponents.d.ts.map \ No newline at end of file diff --git a/dist/src/util/builder/messageComponents.d.ts.map b/dist/src/util/builder/messageComponents.d.ts.map new file mode 100644 index 00000000..e527f79d --- /dev/null +++ b/dist/src/util/builder/messageComponents.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"messageComponents.d.ts","sourceRoot":"","sources":["../../../../src/util/builder/messageComponents.js"],"names":[],"mappings":";AAEA;;GAEG;AACH;IAKI,kBAAoB;IAGtB;;;;OAIG;IACH,wBAHW,SAAS,GACP,iBAAiB,CAa7B;IAED;;;OAGG;IACH,yBASC;CACF"} \ No newline at end of file diff --git a/dist/src/util/builder/textInputBuilder.d.ts b/dist/src/util/builder/textInputBuilder.d.ts new file mode 100644 index 00000000..4f81b0f7 --- /dev/null +++ b/dist/src/util/builder/textInputBuilder.d.ts @@ -0,0 +1,67 @@ +export default TextInput; +/** + * Helps to construct a text input interaction. + * @see {@link https://discord.com/developers/docs/interactions/message-components#text-input-object-text-input-structure} + */ +declare class TextInput { + type: number; + /** + * Sets the text on the input label. + * @param {String} label The text to display as a label to the input. + * @returns {TextInput} + */ + setLabel(label: string): TextInput; + label: string; + /** + * Sets the style of the text input. + * @param {Number} style The text input style. + * @returns {TextInput} + * @see {@link https://discord.com/developers/docs/interactions/message-components#text-input-object-text-input-styles} + */ + setStyle(style: number): TextInput; + style: number; + /** + * Set the custom id of the text input. + * @param {String} id The custom id of the text input. + * @returns {TextInput} + * @see {@link https://discord.com/developers/docs/interactions/message-components#custom-id} + */ + setCustomID(id: string): TextInput; + custom_id: string; + /** + * Set the default value of the text input. + * @param {String} value The value to pre-fill the text input with. + * @returns {TextInput} + */ + setValue(value: string): TextInput; + value: string; + /** + * Set the placeholder text of the text input. + * @param {String} placeholder Placeholder text for the text input. + * @returns {TextInput} + */ + setPlaceholder(placeholder: string): TextInput; + placeholder: string; + /** + * Set the minimum response length the user may enter. + * @param {Number} length Minimum user input length. + * @returns {TextInput} + */ + setMinLength(length: number): TextInput; + min_length: number; + /** + * Set the maximum response length the user may enter. + * @param {Number} length Maximum user input length. + * @returns {TextInput} + */ + setMaxLength(length: number): TextInput; + max_length: number; + /** + * Returns the correct Discord format for a text input. + * @returns {Object} + */ + toJSON(format: any, { suppressValidation }?: { + suppressValidation?: false; + }): any; +} +//# sourceMappingURL=textInputBuilder.d.ts.map \ No newline at end of file diff --git a/dist/src/util/builder/textInputBuilder.d.ts.map b/dist/src/util/builder/textInputBuilder.d.ts.map new file mode 100644 index 00000000..7ce01ec5 --- /dev/null +++ b/dist/src/util/builder/textInputBuilder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"textInputBuilder.d.ts","sourceRoot":"","sources":["../../../../src/util/builder/textInputBuilder.js"],"names":[],"mappings":";AAOA;;;GAGG;AACH;IAKI,aAAsC;IAGxC;;;;OAIG;IACH,yBAFa,SAAS,CAYrB;IANC,cAGW;IAKb;;;;;OAKG;IACH,yBAHa,SAAS,CAUrB;IAHC,cAAkB;IAKpB;;;;;OAKG;IACH,yBAHa,SAAS,CAerB;IAHC,kBAAmB;IAKrB;;;;OAIG;IACH,yBAFa,SAAS,CAYrB;IANC,cAGW;IAKb;;;;OAIG;IACH,qCAFa,SAAS,CAYrB;IANC,oBAGiB;IAKnB;;;;OAIG;IACH,8BAFa,SAAS,CASrB;IAHC,mBAAwB;IAK1B;;;;OAIG;IACH,8BAFa,SAAS,CASrB;IAHC,mBAAwB;IAK1B;;;OAGG;IACH;;YAqFC;CACF"} \ No newline at end of file diff --git a/dist/src/util/discord/checkMemberPermissions.d.ts b/dist/src/util/discord/checkMemberPermissions.d.ts new file mode 100644 index 00000000..9dab9f91 --- /dev/null +++ b/dist/src/util/discord/checkMemberPermissions.d.ts @@ -0,0 +1,9 @@ +export default checkMemberPermissions; +/** + * Returns the permissions of a member based on their roles. + * @param {Role[]} roles An array of roles to check permissions for. + * @returns {String} The permissions of the member. + */ +declare function checkMemberPermissions(roles: Role[]): string; +import Role from "../../structures/Role.js"; +//# sourceMappingURL=checkMemberPermissions.d.ts.map \ No newline at end of file diff --git a/dist/src/util/discord/checkMemberPermissions.d.ts.map b/dist/src/util/discord/checkMemberPermissions.d.ts.map new file mode 100644 index 00000000..694b6fa7 --- /dev/null +++ b/dist/src/util/discord/checkMemberPermissions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"checkMemberPermissions.d.ts","sourceRoot":"","sources":["../../../../src/util/discord/checkMemberPermissions.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH,+CAHW,IAAI,EAAE,UAsBhB;iBA1BgB,0BAA0B"} \ No newline at end of file diff --git a/dist/src/util/discord/checkPermission.d.ts b/dist/src/util/discord/checkPermission.d.ts new file mode 100644 index 00000000..32950689 --- /dev/null +++ b/dist/src/util/discord/checkPermission.d.ts @@ -0,0 +1,10 @@ +export default checkPermission; +/** + * Checks if a set of permissions contains a specific permission. + * @param {String} memberPermission The permissions to check. + * @param {String} permission The permission to check for. + * @param {Boolean?} adminOverride Whether the admin permission should be taken into consideration. + * @returns {Boolean} + */ +declare function checkPermission(memberPermission: string, permission: string, adminOverride?: boolean | null): boolean; +//# sourceMappingURL=checkPermission.d.ts.map \ No newline at end of file diff --git a/dist/src/util/discord/checkPermission.d.ts.map b/dist/src/util/discord/checkPermission.d.ts.map new file mode 100644 index 00000000..98198570 --- /dev/null +++ b/dist/src/util/discord/checkPermission.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"checkPermission.d.ts","sourceRoot":"","sources":["../../../../src/util/discord/checkPermission.js"],"names":[],"mappings":";AAEA;;;;;;GAMG;AACH,+FAHW,cAAQ,WAelB"} \ No newline at end of file diff --git a/dist/src/util/discord/combinePermissions.d.ts b/dist/src/util/discord/combinePermissions.d.ts new file mode 100644 index 00000000..1460e063 --- /dev/null +++ b/dist/src/util/discord/combinePermissions.d.ts @@ -0,0 +1,8 @@ +export default combinePermissions; +/** + * Combines multiple permissions into a single permission. + * @param {...String} permissions The permissions to combine. + * @returns {String} The combined permissions. + */ +declare function combinePermissions(...permissions: string[]): string; +//# sourceMappingURL=combinePermissions.d.ts.map \ No newline at end of file diff --git a/dist/src/util/discord/combinePermissions.d.ts.map b/dist/src/util/discord/combinePermissions.d.ts.map new file mode 100644 index 00000000..649c96c8 --- /dev/null +++ b/dist/src/util/discord/combinePermissions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"combinePermissions.d.ts","sourceRoot":"","sources":["../../../../src/util/discord/combinePermissions.js"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,oDAHY,QAAS,UAgBpB"} \ No newline at end of file diff --git a/dist/src/util/discord/getTimestampFromSnowflake.d.ts b/dist/src/util/discord/getTimestampFromSnowflake.d.ts new file mode 100644 index 00000000..7f13484d --- /dev/null +++ b/dist/src/util/discord/getTimestampFromSnowflake.d.ts @@ -0,0 +1,8 @@ +export default getTimestamp; +/** + * Gives the UNIX timestamp for when the snowflake was created. + * @param {String} snowflake The snowflake (or id). + * @returns {Number} + */ +declare function getTimestamp(snowflake: string): number; +//# sourceMappingURL=getTimestampFromSnowflake.d.ts.map \ No newline at end of file diff --git a/dist/src/util/discord/getTimestampFromSnowflake.d.ts.map b/dist/src/util/discord/getTimestampFromSnowflake.d.ts.map new file mode 100644 index 00000000..fb1286ea --- /dev/null +++ b/dist/src/util/discord/getTimestampFromSnowflake.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getTimestampFromSnowflake.d.ts","sourceRoot":"","sources":["../../../../src/util/discord/getTimestampFromSnowflake.js"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,yDAKC"} \ No newline at end of file diff --git a/dist/src/util/discord/resolveEmoji.d.ts b/dist/src/util/discord/resolveEmoji.d.ts new file mode 100644 index 00000000..0fe84049 --- /dev/null +++ b/dist/src/util/discord/resolveEmoji.d.ts @@ -0,0 +1,8 @@ +export default resolveEmoji; +/** + * Gives a valid Discord emoji structure when given an emoji mention. + * @param {String} text Emoji mention. e.g. <:bitcoin:844240546246950922> + * @returns {Object} + */ +declare function resolveEmoji(text: string): any; +//# sourceMappingURL=resolveEmoji.d.ts.map \ No newline at end of file diff --git a/dist/src/util/discord/resolveEmoji.d.ts.map b/dist/src/util/discord/resolveEmoji.d.ts.map new file mode 100644 index 00000000..dd31742b --- /dev/null +++ b/dist/src/util/discord/resolveEmoji.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"resolveEmoji.d.ts","sourceRoot":"","sources":["../../../../src/util/discord/resolveEmoji.js"],"names":[],"mappings":";AACA;;;;GAIG;AACH,iDAmBC"} \ No newline at end of file diff --git a/dist/src/util/discord/verifyMessageLink.d.ts b/dist/src/util/discord/verifyMessageLink.d.ts new file mode 100644 index 00000000..24939884 --- /dev/null +++ b/dist/src/util/discord/verifyMessageLink.d.ts @@ -0,0 +1,8 @@ +export default verifyMessageLink; +/** + * Whether the string provided contains a valid message link. + * @param {String} text A url to a Discord message. + * @returns {String?} The link to a message, if it is present. + */ +declare function verifyMessageLink(text: string): string | null; +//# sourceMappingURL=verifyMessageLink.d.ts.map \ No newline at end of file diff --git a/dist/src/util/discord/verifyMessageLink.d.ts.map b/dist/src/util/discord/verifyMessageLink.d.ts.map new file mode 100644 index 00000000..fe59c2a3 --- /dev/null +++ b/dist/src/util/discord/verifyMessageLink.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"verifyMessageLink.d.ts","sourceRoot":"","sources":["../../../../src/util/discord/verifyMessageLink.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH,kDAFa,aAAO,CAmBnB"} \ No newline at end of file diff --git a/dist/src/util/general/decryptText.d.ts b/dist/src/util/general/decryptText.d.ts new file mode 100644 index 00000000..b22d2fcc --- /dev/null +++ b/dist/src/util/general/decryptText.d.ts @@ -0,0 +1,11 @@ +export default decryptText; +/** + * Decrypts text and returns the plain text. + * @param {String} text The text to decrypt. + * @param {CipherKey} key The key used for encryption, must be 32 characters in length. + * @param {BinaryLike} iv The iv used for encryption, must be 16 characters in length. + * @returns {String} + * @see {@link https://stackoverflow.com/questions/32038267/getting-error-wrong-final-block-length-when-decrypting-aes256-cipher} + */ +declare function decryptText(text: string, key: CipherKey, iv: BinaryLike): string; +//# sourceMappingURL=decryptText.d.ts.map \ No newline at end of file diff --git a/dist/src/util/general/decryptText.d.ts.map b/dist/src/util/general/decryptText.d.ts.map new file mode 100644 index 00000000..25d0f49c --- /dev/null +++ b/dist/src/util/general/decryptText.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decryptText.d.ts","sourceRoot":"","sources":["../../../../src/util/general/decryptText.js"],"names":[],"mappings":";AAGA;;;;;;;GAOG;AACH,gDALW,SAAS,MACT,UAAU,UAsBpB"} \ No newline at end of file diff --git a/dist/src/util/general/deepCompare.d.ts b/dist/src/util/general/deepCompare.d.ts new file mode 100644 index 00000000..a42a5ed4 --- /dev/null +++ b/dist/src/util/general/deepCompare.d.ts @@ -0,0 +1,9 @@ +export default deepCompare; +/** + * Compares each property of an object and returns an array of the property names which are unique in their value across the objects. + * @param {Object} object0 + * @param {Object} object1 + * @returns {Array} + */ +declare function deepCompare(object0: any, object1: any): Array; +//# sourceMappingURL=deepCompare.d.ts.map \ No newline at end of file diff --git a/dist/src/util/general/deepCompare.d.ts.map b/dist/src/util/general/deepCompare.d.ts.map new file mode 100644 index 00000000..74d1407b --- /dev/null +++ b/dist/src/util/general/deepCompare.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"deepCompare.d.ts","sourceRoot":"","sources":["../../../../src/util/general/deepCompare.js"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,0DAFa,KAAK,QAAQ,CAqBzB"} \ No newline at end of file diff --git a/dist/src/util/general/encryptText.d.ts b/dist/src/util/general/encryptText.d.ts new file mode 100644 index 00000000..9ebc3374 --- /dev/null +++ b/dist/src/util/general/encryptText.d.ts @@ -0,0 +1,11 @@ +export default encryptText; +/** + * Encrypts text and returns the plain text. + * @param {String} text The text to encrypt. + * @param {CipherKey} key The key to use for encryption. + * @param {BinaryLike} iv The iv to use for encryption. + * @returns {String} + * @see {@link https://stackoverflow.com/questions/32038267/getting-error-wrong-final-block-length-when-decrypting-aes256-cipher} + */ +declare function encryptText(text: string, key: CipherKey, iv: BinaryLike): string; +//# sourceMappingURL=encryptText.d.ts.map \ No newline at end of file diff --git a/dist/src/util/general/encryptText.d.ts.map b/dist/src/util/general/encryptText.d.ts.map new file mode 100644 index 00000000..68b9c180 --- /dev/null +++ b/dist/src/util/general/encryptText.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encryptText.d.ts","sourceRoot":"","sources":["../../../../src/util/general/encryptText.js"],"names":[],"mappings":";AAGA;;;;;;;GAOG;AACH,gDALW,SAAS,MACT,UAAU,UAqBpB"} \ No newline at end of file diff --git a/dist/src/util/general/hexToInt.d.ts b/dist/src/util/general/hexToInt.d.ts new file mode 100644 index 00000000..f1091d29 --- /dev/null +++ b/dist/src/util/general/hexToInt.d.ts @@ -0,0 +1,8 @@ +export default hexToInt; +/** + * Returns the integer representation of a hex string. + * @param {String} hex The hex string to convert to an integer. + * @returns {Number} + */ +declare function hexToInt(hex: string): number; +//# sourceMappingURL=hexToInt.d.ts.map \ No newline at end of file diff --git a/dist/src/util/general/hexToInt.d.ts.map b/dist/src/util/general/hexToInt.d.ts.map new file mode 100644 index 00000000..f74a320e --- /dev/null +++ b/dist/src/util/general/hexToInt.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hexToInt.d.ts","sourceRoot":"","sources":["../../../../src/util/general/hexToInt.js"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,+CAMC"} \ No newline at end of file diff --git a/dist/src/util/general/isValidUrl.d.ts b/dist/src/util/general/isValidUrl.d.ts new file mode 100644 index 00000000..ea88f4ff --- /dev/null +++ b/dist/src/util/general/isValidUrl.d.ts @@ -0,0 +1,8 @@ +export default isValidUrl; +/** + * Checks if a URL is valid. + * @param {String} url The URL to validate. + * @returns {Boolean} + */ +declare function isValidUrl(url: string): boolean; +//# sourceMappingURL=isValidUrl.d.ts.map \ No newline at end of file diff --git a/dist/src/util/general/isValidUrl.d.ts.map b/dist/src/util/general/isValidUrl.d.ts.map new file mode 100644 index 00000000..58f6320f --- /dev/null +++ b/dist/src/util/general/isValidUrl.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"isValidUrl.d.ts","sourceRoot":"","sources":["../../../../src/util/general/isValidUrl.js"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,kDAMC"} \ No newline at end of file diff --git a/dist/src/util/general/structureHashName.d.ts b/dist/src/util/general/structureHashName.d.ts new file mode 100644 index 00000000..cfe080a3 --- /dev/null +++ b/dist/src/util/general/structureHashName.d.ts @@ -0,0 +1,8 @@ +export default structureHashName; +/** + * Returns a hashed name. + * @param {...String} ids The IDs to structure the hash name. + * @returns {String} + */ +declare function structureHashName(...ids: string[]): string; +//# sourceMappingURL=structureHashName.d.ts.map \ No newline at end of file diff --git a/dist/src/util/general/structureHashName.d.ts.map b/dist/src/util/general/structureHashName.d.ts.map new file mode 100644 index 00000000..0966f043 --- /dev/null +++ b/dist/src/util/general/structureHashName.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"structureHashName.d.ts","sourceRoot":"","sources":["../../../../src/util/general/structureHashName.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH,2CAHY,QAAS,UASpB"} \ No newline at end of file diff --git a/dist/src/util/gluon/cacheChannel.d.ts b/dist/src/util/gluon/cacheChannel.d.ts new file mode 100644 index 00000000..50ea52ec --- /dev/null +++ b/dist/src/util/gluon/cacheChannel.d.ts @@ -0,0 +1,14 @@ +export default cacheChannel; +/** + * Automatically determines the channel type and caches the channel appropriately. + * @param {Client} client The client instance. + * @param {Object} data The raw channel data from Discord. + * @param {String} guildId The id of the guild that the channel belongs to. + * @param {Boolean?} nocache Whether the channel should be cached. + * @returns {VoiceChannel | Thread | TextChannel} + */ +declare function cacheChannel(client: Client, data: any, guildId: string, nocache?: boolean | null): VoiceChannel | Thread | TextChannel; +import VoiceChannel from "../../structures/VoiceChannel.js"; +import Thread from "../../structures/Thread.js"; +import TextChannel from "../../structures/TextChannel.js"; +//# sourceMappingURL=cacheChannel.d.ts.map \ No newline at end of file diff --git a/dist/src/util/gluon/cacheChannel.d.ts.map b/dist/src/util/gluon/cacheChannel.d.ts.map new file mode 100644 index 00000000..242429aa --- /dev/null +++ b/dist/src/util/gluon/cacheChannel.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"cacheChannel.d.ts","sourceRoot":"","sources":["../../../../src/util/gluon/cacheChannel.js"],"names":[],"mappings":";AAMA;;;;;;;GAOG;AACH,sCANW,MAAM,wCAGN,cAAQ,GACN,YAAY,GAAG,MAAM,GAAG,WAAW,CAuB/C;yBA/BwB,kCAAkC;mBADxC,4BAA4B;wBADvB,iCAAiC"} \ No newline at end of file diff --git a/dist/src/util/gluon/decryptStructure.d.ts b/dist/src/util/gluon/decryptStructure.d.ts new file mode 100644 index 00000000..99be3f46 --- /dev/null +++ b/dist/src/util/gluon/decryptStructure.d.ts @@ -0,0 +1,10 @@ +export default decryptStructure; +/** + * Decrypts a message and returns the message structure for it. + * @param {String} encryptedMessage The encrypted message. + * @param {...String} decryptionKeys The decryption keys to use. + * @returns {Message} + */ +declare function decryptStructure(encryptedStructure: any, ...decryptionKeys: string[]): Message; +import Message from "../../structures/Message.js"; +//# sourceMappingURL=decryptStructure.d.ts.map \ No newline at end of file diff --git a/dist/src/util/gluon/decryptStructure.d.ts.map b/dist/src/util/gluon/decryptStructure.d.ts.map new file mode 100644 index 00000000..df690344 --- /dev/null +++ b/dist/src/util/gluon/decryptStructure.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decryptStructure.d.ts","sourceRoot":"","sources":["../../../../src/util/gluon/decryptStructure.js"],"names":[],"mappings":";AAIA;;;;;GAKG;AACH,8EAHW,QAAS,GACP,OAAO,CAkBnB;oBAzBmB,6BAA6B"} \ No newline at end of file diff --git a/dist/src/util/gluon/encryptStructure.d.ts b/dist/src/util/gluon/encryptStructure.d.ts new file mode 100644 index 00000000..b578f677 --- /dev/null +++ b/dist/src/util/gluon/encryptStructure.d.ts @@ -0,0 +1,9 @@ +export default encryptStructure; +/** + * Encrypts a structure and returns an encrypted string. + * @param {Object} structure The structure to encrypt. + * @param {...String} encryptionKeys The encryption keys to use. + * @returns {String} + */ +declare function encryptStructure(structure: any, ...encryptionKeys: string[]): string; +//# sourceMappingURL=encryptStructure.d.ts.map \ No newline at end of file diff --git a/dist/src/util/gluon/encryptStructure.d.ts.map b/dist/src/util/gluon/encryptStructure.d.ts.map new file mode 100644 index 00000000..74f1f6a4 --- /dev/null +++ b/dist/src/util/gluon/encryptStructure.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encryptStructure.d.ts","sourceRoot":"","sources":["../../../../src/util/gluon/encryptStructure.js"],"names":[],"mappings":";AAIA;;;;;GAKG;AACH,qEAHW,QAAS,UA2BnB"} \ No newline at end of file diff --git a/dist/src/util/gluon/generateWebsocketURL.d.ts b/dist/src/util/gluon/generateWebsocketURL.d.ts new file mode 100644 index 00000000..1a5502d9 --- /dev/null +++ b/dist/src/util/gluon/generateWebsocketURL.d.ts @@ -0,0 +1,3 @@ +export default generateWebsocketURL; +declare function generateWebsocketURL(url: any): string; +//# sourceMappingURL=generateWebsocketURL.d.ts.map \ No newline at end of file diff --git a/dist/src/util/gluon/generateWebsocketURL.d.ts.map b/dist/src/util/gluon/generateWebsocketURL.d.ts.map new file mode 100644 index 00000000..0b67bb68 --- /dev/null +++ b/dist/src/util/gluon/generateWebsocketURL.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"generateWebsocketURL.d.ts","sourceRoot":"","sources":["../../../../src/util/gluon/generateWebsocketURL.js"],"names":[],"mappings":";AAEA,wDAIC"} \ No newline at end of file diff --git a/dist/src/util/gluon/getKeyIv.d.ts b/dist/src/util/gluon/getKeyIv.d.ts new file mode 100644 index 00000000..0974d192 --- /dev/null +++ b/dist/src/util/gluon/getKeyIv.d.ts @@ -0,0 +1,8 @@ +export default getKeyIv; +/** + * Returns a key and iv for encryption and decryption. + * @param {...String} args The arguments to generate the key and iv. + * @returns {Object} + */ +declare function getKeyIv(...args: string[]): any; +//# sourceMappingURL=getKeyIv.d.ts.map \ No newline at end of file diff --git a/dist/src/util/gluon/getKeyIv.d.ts.map b/dist/src/util/gluon/getKeyIv.d.ts.map new file mode 100644 index 00000000..4b662398 --- /dev/null +++ b/dist/src/util/gluon/getKeyIv.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"getKeyIv.d.ts","sourceRoot":"","sources":["../../../../src/util/gluon/getKeyIv.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH,mCAHY,QAAS,OAwBpB"} \ No newline at end of file diff --git a/dist/src/util/gluon/gluonCacheRule.d.ts b/dist/src/util/gluon/gluonCacheRule.d.ts new file mode 100644 index 00000000..06b5d7d0 --- /dev/null +++ b/dist/src/util/gluon/gluonCacheRule.d.ts @@ -0,0 +1,51 @@ +export default GluonCacheRule; +declare class GluonCacheRule { + /** + * The name of the rule. + * @param {String} name What the rule is called. + * @returns {GluonCacheRule} + */ + setName(name: string): GluonCacheRule; + name: string; + /** + * Set the function which handles the rule. + * The function is passed the structure data that this rule is for. + * @param {Function} handlerFunction A function that handles the rule. + * @returns {GluonCacheRule} + * @public + * @method + * @throws {TypeError} + */ + public setHandlerFunction(handlerFunction: Function): GluonCacheRule; + handlerFunction: Function; + /** + * Set the type of structure this rule is for. + * Pass the class of the structure type. + * @param {Object} structureType The type of structure this rule is for. + * @returns {GluonCacheRule} + * @public + * @method + * @throws {TypeError} + */ + public setStructureType(structureType: any): GluonCacheRule; + structureType: any; + /** + * Set the function which retrieves the data for the structure. + * @param {Function} retrieveFunction The function that retrieves the data for the structure. + * @returns {GluonCacheRule} + * @public + * @method + * @throws {TypeError} + */ + public setRetrieveFunction(retrieveFunction: Function): GluonCacheRule; + retrieveFunction: Function; + /** + * Apply the rule to the structure type. + * @returns {void} + * @public + * @method + * @throws {Error} + */ + public applyRule(): void; +} +//# sourceMappingURL=gluonCacheRule.d.ts.map \ No newline at end of file diff --git a/dist/src/util/gluon/gluonCacheRule.d.ts.map b/dist/src/util/gluon/gluonCacheRule.d.ts.map new file mode 100644 index 00000000..a1046d89 --- /dev/null +++ b/dist/src/util/gluon/gluonCacheRule.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"gluonCacheRule.d.ts","sourceRoot":"","sources":["../../../../src/util/gluon/gluonCacheRule.js"],"names":[],"mappings":";AAAA;IACE;;;;OAIG;IACH,uBAFa,cAAc,CAS1B;IAHC,aAAgB;IAKlB;;;;;;;;OAQG;IACH,sDALa,cAAc,CAY1B;IAHC,0BAAsC;IAKxC;;;;;;;;OAQG;IACH,6CALa,cAAc,CAY1B;IAHC,mBAAkC;IAKpC;;;;;;;OAOG;IACH,wDALa,cAAc,CAY1B;IAHC,2BAAwC;IAK1C;;;;;;OAMG;IACH,oBALa,IAAI,CAuBhB;CACF"} \ No newline at end of file