@guardbot/framework 1.1.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/FrameworkClient.ts","../src/utils/files.ts","../src/utils/helpers.ts","../src/utils/perms.ts","../src/core/FrameworkError.ts","../src/modules/AutocompletersModule.ts","../src/modules/ListenersModule.ts","../src/modules/CommandsModule.ts","../src/builders/autocompleters/Autocompleter.ts","../src/types/commands.ts","../src/builders/commands/ContextCommand.ts","../src/builders/commands/BaseCommand.ts","../src/builders/commands/MessageCommand.ts","../src/builders/commands/SlashCommand.ts","../src/builders/listeners/Listener.ts","../src/extensions/index.ts","../src/extensions/Message.ts","../src/index.ts"],"sourcesContent":["import { FrameworkAutocompleter, FrameworkClientOptions, FrameworkCommand, FrameworkListener } from '../types';\nimport { ClientEvents, Collection, Client as DiscordClient } from 'discord.js';\nimport AutocompletersModule from '../modules/AutocompletersModule';\nimport ListenersModule from '../modules/ListenersModule';\nimport CommandsModule from '../modules/CommandsModule';\nimport { dirExists, resolvePath } from '../utils';\n\n\nexport class FrameworkClient<Ready extends boolean = boolean> extends DiscordClient<Ready> {\n public prefix: string;\n public developers: string[];\n public rootDir: string;\n public commandsDir: string;\n public listenersDir: string;\n public autocompletersDir: string;\n private _inited = false;\n\n public autocompleters: Collection<string, FrameworkAutocompleter> = new Collection();\n public events: Collection<string, FrameworkListener<keyof ClientEvents>> = new Collection();\n public aliases: Collection<string, string> = new Collection();\n public commands: Collection<string, FrameworkCommand> = new Collection();\n public cooldowns: Collection<string, Collection<string, number>> = new Collection();\n\n public commandsModule: CommandsModule;\n public listenersModule: ListenersModule;\n public autocompletersModule: AutocompletersModule;\n\n constructor(frameworkOptions: FrameworkClientOptions) {\n super(frameworkOptions.clientOptions);\n\n this.prefix = frameworkOptions.prefix ?? '!';\n this.developers = [...(frameworkOptions.developers || [])];\n\n this.rootDir = frameworkOptions.rootDir ?? (dirExists('./src') ? './src' : './');\n this.commandsDir = resolvePath(this.rootDir, frameworkOptions.commandsDir ?? 'commands');\n this.listenersDir = resolvePath(this.rootDir, frameworkOptions.listenersDir ?? 'listeners');\n this.autocompletersDir = resolvePath(this.rootDir, frameworkOptions.autocompletersDir ?? 'autocompleters');\n\n this.commandsModule = new CommandsModule(this);\n this.listenersModule = new ListenersModule(this);\n this.autocompletersModule = new AutocompletersModule(this);\n\n this.routeInteractions();\n this.once('clientReady', async () => {\n if (frameworkOptions.registerOnStart && frameworkOptions.guildsToRegister?.length) {\n await this.commandsModule.registerOnStart(frameworkOptions.guildsToRegister);\n }\n });\n }\n \n public async init() {\n this._inited = true;\n await this.listenersModule.loadAll();\n await this.autocompletersModule.loadAll();\n await this.commandsModule.loadAll();\n }\n\n public async start(token: string) {\n if (!this._inited) await this.init();\n await this.login(token);\n }\n\n private routeInteractions() {\n this.on('interactionCreate', (interaction) => {\n if (interaction.isAnySelectMenu()) return this.emit('selectMenuInteraction', interaction);\n else if (interaction.isModalSubmit()) return this.emit('modalSubmitInteraction', interaction);\n else if (interaction.isButton()) return this.emit('buttonInteraction', interaction);\n });\n }\n}","import path from 'node:path';\nimport url from 'node:url';\nimport fs from 'node:fs';\n\n\nexport async function listFiles(dir: string): Promise<string[]> {\n if (!fs.existsSync(dir)) return [];\n \n const files: string[] = [];\n const items = fs.readdirSync(dir, { withFileTypes: true });\n \n for (const item of items) {\n const fullPath = path.join(dir, item.name);\n if (item.isDirectory()) files.push(...(await listFiles(fullPath)));\n else if (item.name.endsWith('.js') || item.name.endsWith('.ts')) files.push(fullPath);\n }\n return files;\n}\n\nexport function assertDir(dir: string, name: string) {\n if (!fs.existsSync(dir)) {\n throw new Error(`Invalid ${name}: ${dir} does not exist`);\n }\n}\n\nexport function dirExists(dir: string) {\n return fs.existsSync(dir);\n}\n\nexport function resolvePath(...paths: string[]) {\n return path.resolve(...paths);\n}\n\nexport function pathToFileURL(filepath: string) {\n return url.pathToFileURL(filepath);\n}","import { APIApplicationCommandOption, ApplicationIntegrationType, InteractionContextType, SlashCommandBuilder } from 'discord.js';\nimport { CommandType, CommandContext, IntegrationType, TimestampTypes, SlashOptionsInput } from '../types';\n\n\nexport function unixTimestamp(date: Date|number, type: TimestampTypes = 'f'): string {\n return `<t:${Math.floor(new Date(date).valueOf() / 1000)}:${type}>`\n}\n\nexport function createPrefixRegex(userId: string, prefix?: string) {\n return new RegExp(`^(<@!?${userId}>${prefix ? `|${prefix.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}` : ''})\\\\s*`);\n}\n\nexport function normalizeCommandName(name: string, type: CommandType): string {\n if (type === 'ContextUser' || type === 'ContextMessage') return name;\n return name.trim().toLowerCase().replace(/\\s+/g, '-');\n}\n\nexport function resolveCommandContexts(contexts?: CommandContext[]) {\n return (contexts?.length \n ? contexts.map(c => (typeof c === 'string' ? InteractionContextType[c] : c))\n : [InteractionContextType.Guild]\n );\n}\n\nexport function resolveIntegrationTypes(types?: IntegrationType[]) {\n return (types?.length\n ? types.map(t => (typeof t === 'string' ? ApplicationIntegrationType[t] : t))\n : [ApplicationIntegrationType.GuildInstall]\n );\n}\n\nexport function normalizeOptions(options: SlashOptionsInput | undefined): APIApplicationCommandOption[] {\n if (!options || !options?.length) return [];\n\n if (typeof options === 'function') {\n const built = options(new SlashCommandBuilder());\n return built.options?.map(o => o.toJSON()) ?? [];\n }\n\n if (Array.isArray(options)) {\n return options.map(o => ('toJSON' in o ? o.toJSON() : o));\n }\n\n return [];\n}","import { GuildMember, GuildTextBasedChannel, PermissionResolvable, PermissionsBitField } from 'discord.js';\n\n\nexport function isPermissionResolvable(option: any): option is PermissionResolvable {\n try {\n PermissionsBitField.resolve(option);\n return true;\n } catch { return false; };\n}\n\nexport function resolvePermissions(member: GuildMember, channel?: GuildTextBasedChannel | null): PermissionsBitField {\n return (channel && member.permissionsIn(channel)) ?? member.permissions;\n}\n\nexport function formatPermissions(perms: string[]): string {\n return perms.map(\n p =>`\\`${p.replace(/([A-Z])/g, (m, l, i) => (i === 0 ? l : ` ${l}`))}\\``\n ).join(', ');\n}","import { inspect } from 'util';\n\ntype FrameworkErrorName = (\n 'NoOptions' | 'InvalidOption' | 'InvalidType' | 'InvalidValue' | 'InvalidValues' |\n 'UnknownComponent' | 'ComponentLoadError' | 'ComponentAlreadyLoaded' |\n 'AppCommandRegister'\n);\n\nconst messages: Record<FrameworkErrorName, (...values: any[]) => string> = {\n NoOptions: () => `No options object was provided.`,\n InvalidOption: (name: string) => `No \"${name}\" option was provided.`,\n InvalidType: (name: string, expected: string, actual: string) => `Expected \"${name}\" to be of type \"${expected}\", but got \"${actual}\".`,\n InvalidValue: (name: string, expected: string[]) => `Expected \"${name}\" to be any one of the listed values: ${expected.map(v => `\"${v}\"`).join(' | ')}`,\n InvalidValues: (name: string, expected: string[]) => `Expected \"${name}\" to contain only the listed values: ${expected.map(v => `\"${v}\"`).join(' | ')}`,\n UnknownComponent: (type: string, id: string) => `Encountered an error as there is no \"${type}\" loaded with the id \"${id}\".`,\n ComponentLoadError: (type: string, error: Error) => `Encountered an error while loading the \"${type}\": \\n${inspect(error)}`,\n ComponentAlreadyLoaded: (type: string, id: string) => `Encountered an error as a \"${type}\" with the id \"${id}\" is already loaded.`,\n AppCommandRegister: (error: Error, guildId?: string) => `Encountered an error while registering commands ${guildId ? `to guild \"${guildId}\"` : ''}: \\n${inspect(error)}`,\n};\n\nexport class FrameworkError extends Error {\n constructor(id: FrameworkErrorName, ...values: any[]) {\n super(messages[id](...values));\n this.name = `FrameworkError [${id}]`;\n }\n}\n\nexport class FrameworkTypeError extends TypeError {\n constructor(id: FrameworkErrorName, ...values: any[]) {\n super(messages[id](...values));\n this.name = `FrameworkTypeError [${id}]`;\n }\n}","import { listFiles, pathToFileURL, resolvePath } from '../utils';\nimport { FrameworkError } from '../core/FrameworkError';\nimport { FrameworkClient } from '../core/FrameworkClient';\nimport { FrameworkAutocompleter } from '../types';\nimport { Interaction } from 'discord.js';\nimport EventEmitter from 'events';\n\n\n/**\n * @class AutocompletersModule\n * @fires AutocompletersModule#execute\n * @fires AutocompletersModule#success\n * @fires AutocompletersModule#error\n * @fires AutocompletersModule#unknown\n */\nexport default class AutocompletersModule extends EventEmitter {\n private client: FrameworkClient<true>;\n constructor(client: FrameworkClient) {\n super();\n this.client = client as FrameworkClient<true>;\n this.client.on('interactionCreate', (interaction) => this._handleInteraction(interaction));\n }\n\n async load(filepath: string, reload: boolean = false) {\n const module = await import(pathToFileURL(filepath).href + `?update=${Date.now()}`);\n const completer: FrameworkAutocompleter = module.autocomplete ?? module.default?.default ?? module.default ?? module;\n\n if (typeof completer !== 'object' || !completer.name || completer.disabled) return false;\n if (!reload && this.client.autocompleters.has(completer.id)) throw new FrameworkError('ComponentAlreadyLoaded', 'autocomplete', completer.id);\n\n completer.filepath = filepath;\n this.client.autocompleters.set(completer.id, completer);\n return true;\n }\n\n async loadAll() {\n const files = await listFiles(this.client.autocompletersDir);\n\n for (const file of files) {\n try {\n await this.load(resolvePath(file));\n } catch (error) {\n this.client.emit('error', new FrameworkError('ComponentLoadError', 'autocomplete', error));\n }\n }\n }\n\n async reload(id: string) {\n const completer = this.client.autocompleters.get(id);\n if (!completer) throw new FrameworkError('UnknownComponent', 'autocomplete', id);\n\n this.unload(id, true);\n await this.load(completer.filepath, true);\n }\n\n private unload(id: string, reload: boolean = false) {\n if (!this.client.autocompleters.has(id)) throw new FrameworkError('UnknownComponent', 'autocomplete', id);\n const completer = this.client.autocompleters.get(id)!;\n\n delete require.cache[require.resolve(completer.filepath)];\n if (!reload) this.client.autocompleters.delete(id);\n }\n\n\n private async _handleInteraction(interaction: Interaction) {\n if (!interaction.isAutocomplete()) return;\n\n const option = interaction.options.getFocused(true);\n const command = this.client.commands.get(`Slash:${interaction.commandName}`);\n const completer = this.client.autocompleters.get(option.name);\n\n if (!command || command.commandType !== 'Slash') {\n this.emit('unknown', interaction);\n return;\n }\n\n if (!interaction.inCachedGuild()) return;\n const allowed = !completer?.commands?.length || completer.commands.includes(command.name);\n\n if (completer && !completer.disabled && allowed) {\n try {\n this.emit('execute', { interaction, command, completer });\n await completer.execute(this.client, interaction, command, option.value);\n this.emit('success', { interaction, command, completer });\n } catch (error) {\n this.emit('error', { interaction, command, completer, error });\n }\n }\n else if (typeof command.autocomplete === 'function' && !command.disabled) {\n try {\n this.emit('execute', { interaction, command, completer });\n await command.autocomplete(this.client, interaction);\n this.emit('success', { interaction, command, completer });\n } catch (error) {\n this.emit('error', { interaction, command, completer, error });\n }\n }\n else {\n this.emit('unknown', interaction);\n }\n }\n}\n\n\n/**\n * Emitted when a completer is executed\n * @event AutocompletersModule#execute\n * @param {FrameworkSlashCommand} context.command The command\n * @param {FrameworkAutocompleter} context.completer The autocompleter\n * @param {AutocompleteInteraction} context.interaction The autocomplete interaction\n */\n\n/**\n * Emitted when a completer finishes execution successfully\n * @event AutocompletersModule#success\n * @param {FrameworkSlashCommand} context.command The command\n * @param {FrameworkAutocompleter} context.completer The autocompleter\n * @param {AutocompleteInteraction} context.interaction The autocomplete interaction\n */\n\n/**\n * Emitted when a completer throws an error\n * @event AutocompletersModule#error\n * @param {FrameworkSlashCommand} context.command The command\n * @param {FrameworkAutocompleter} context.completer The autocompleter\n * @param {AutocompleteInteraction} context.interaction The autocomplete interaction\n * @param {Error} context.error The error\n */\n\n/**\n * Emitted when an interaction arrives with a completer that is not loaded\n * @event AutocompletersModule#unknown\n * @param {AutocompleteInteraction} interaction The interaction\n */","import { listFiles, pathToFileURL, resolvePath } from '../utils';\nimport { FrameworkClient } from '../core/FrameworkClient';\nimport { FrameworkError } from '../core/FrameworkError';\nimport { FrameworkListener } from '../types';\n\n\nexport default class ListenerModule {\n private client: FrameworkClient<true>;\n constructor(client: FrameworkClient) {\n this.client = client as FrameworkClient<true>;\n }\n\n async load(filepath: string, reload: boolean = false) {\n const module = await import(pathToFileURL(filepath).href + `?update=${Date.now()}`);\n const listener: FrameworkListener = module?.listener ?? module?.default?.default ?? module?.default ?? module;\n\n if (typeof listener !== 'object' || !listener.name || listener.disabled) return false;\n if (!reload && this.client.events.has(listener.id)) throw new FrameworkError('ComponentAlreadyLoaded', 'listener', listener.id);\n\n listener.filepath = filepath;\n listener._execute = (...args) => listener.execute(...args);\n \n this.client[listener.once ? 'once' : 'on'](listener.name, listener._execute);\n this.client.events.set(listener.id, listener);\n return true;\n }\n\n async loadAll() {\n const files = await listFiles(this.client.listenersDir);\n\n for (const file of files) {\n try {\n await this.load(resolvePath(file));\n } catch (error) {\n this.client.emit('error', new FrameworkError('ComponentLoadError', 'listener', error));\n }\n }\n }\n\n async reload(id: string) {\n if (!this.client.events.has(id)) throw new FrameworkError('UnknownComponent', 'listener', id);\n const listener = this.client.events.get(id)!;\n\n this.unload(id, true);\n await this.load(listener.filepath, true);\n }\n\n private unload(id: string, reload: boolean = false) {\n if (!this.client.events.has(id)) throw new FrameworkError('UnknownComponent', 'listener', id);\n const listener = this.client.events.get(id)!;\n\n if (listener._execute) this.client.off(listener.name, listener._execute);\n delete require.cache[require.resolve(listener.filepath)];\n if (!reload) this.client.events.delete(id);\n }\n}","import { listFiles, resolveCommandContexts, resolveIntegrationTypes, unixTimestamp, createPrefixRegex, pathToFileURL, resolvePath, resolvePermissions, formatPermissions } from '../utils';\nimport { FrameworkCommand, FrameworkSlashCommand, FrameworkContextCommand, CommandCustomHandlers, CommandMiddleware } from '../types';\nimport { ApplicationCommandType, Collection, Interaction, Message, MessageFlags } from 'discord.js';\nimport { FrameworkClient } from '../core/FrameworkClient';\nimport { FrameworkError } from '../core/FrameworkError';\nimport EventEmitter from 'events';\n\n\n/**\n * @class CommandsModule\n * @fires CommandsModule#execute\n * @fires CommandsModule#success\n * @fires CommandsModule#error\n * @fires CommandsModule#unknown\n */\nexport default class CommandsModule extends EventEmitter {\n private client: FrameworkClient<true>;\n private handlers: CommandCustomHandlers = {};\n private middleware?: CommandMiddleware;\n private prefixRegex?: RegExp;\n\n constructor(client: FrameworkClient) {\n super();\n this.client = client as FrameworkClient<true>;\n this.client.on('messageCreate', (message) => this._handleMessage(message));\n this.client.on('interactionCreate', (interaction) => this._handleInteraction(interaction));\n }\n\n setHandler<K extends keyof CommandCustomHandlers>(key: K, callback: NonNullable<CommandCustomHandlers[K]>) {\n this.handlers[key] = callback;\n return true;\n }\n\n setMiddleware(callback: CommandMiddleware) {\n this.middleware = callback;\n return true;\n }\n\n\n async load(filepath: string, reload: boolean = false) {\n const module = await import(pathToFileURL(filepath).href + `?update=${Date.now()}`);\n const command: FrameworkCommand = module?.command ?? module?.default?.default ?? module?.default ?? module;\n\n if (typeof command !== 'object' || !command.name || command.disabled) return false;\n if (!reload && this.client.commands.has(command.id)) throw new FrameworkError('ComponentAlreadyLoaded', 'command', command.id);\n\n command.filepath = filepath;\n this.client.commands.set(command.id, command);\n\n if (command.commandType === 'Message' && Array.isArray(command.aliases)) command.aliases.forEach((alias: any) => {\n if (typeof alias === 'string' && !this.client.aliases.get(alias)) this.client.aliases.set(alias, command.id);\n });\n return true;\n }\n\n async loadAll() {\n const files = await listFiles(this.client.commandsDir);\n\n for (const file of files) {\n try {\n await this.load(resolvePath(file));\n } catch (error) {\n this.client.emit('error', new FrameworkError('ComponentLoadError', 'commands', error));\n }\n }\n }\n \n async reload(id: string) {\n if (!this.client.commands.has(id)) throw new FrameworkError('UnknownComponent', 'commands', id);\n const command = this.client.commands.get(id)!;\n\n this.unload(id, true);\n await this.load(command.filepath, true);\n }\n\n private unload(id: string, reload: boolean = false) {\n if (!this.client.commands.has(id)) throw new FrameworkError('UnknownComponent', 'commands', id);\n const command = this.client.commands.get(id)!;\n \n delete require.cache[require.resolve(command.filepath)];\n if (!reload) this.client.commands.delete(id);\n }\n\n\n async registerOnStart(guildIds: string[], commands?: Collection<string, FrameworkCommand>) {\n for (const guildId of guildIds) {\n try {\n await this.publishGuild(guildId, commands);\n } catch (error) {\n this.client.emit('error', new FrameworkError('AppCommandRegister', error, guildId));\n }\n }\n }\n\n async publishGlobal(commands?: Collection<string, FrameworkCommand>) {\n if (!this.client.application) return false;\n const commandsToSet = (commands ?? this.client.commands).filter(c => c.commandType !== 'Message' && c.commandScope !== 'guild' && !c.disabled).map((c: any) => this._getCommandData(c));\n return this.client.application.commands.set(commandsToSet);\n }\n\n async publishGuild(guildId: string, commands?: Collection<string, FrameworkCommand>) {\n const commandsToSet = (commands ?? this.client.commands).filter(c => c.commandType !== 'Message' && c.commandScope !== 'global' && !c.disabled).map((c: any) => this._getCommandData(c));\n const guild = await this.client.guilds.fetch({ guild: guildId, force: false });\n if (guild) guild.commands.set(commandsToSet);\n }\n\n\n private async _handleMessage(message: Message) {\n if (!message.content?.length || message.author.bot) return;\n if (!this.prefixRegex) this.prefixRegex = createPrefixRegex(message.client.user.id, this.client.prefix);\n\n if (!this.prefixRegex.test(message.content.toLowerCase())) return;\n const matchedPrefix = message.content.toLowerCase().match(this.prefixRegex)?.[1];\n if (!matchedPrefix) return;\n\n const args = (message.content || '').slice(matchedPrefix.length).trim().split(/ +/);\n const commandName = args.shift()?.toLowerCase();\n if (!commandName) return;\n\n const commandId = `Message:${commandName}`;\n const command = this.client.commands.get(commandId) || this.client.commands.get(this.client.aliases.get(commandName) || '');\n if (!command || command.commandType !== 'Message' || command.disabled || (command.devOnly && !this.client.developers.includes(message.author.id))) return;\n if ((!message.inGuild() && !command.contexts.includes('BotDM')) || (message.inGuild() && !command.contexts.includes('Guild'))) return;\n\n if (this.middleware) {\n const shouldContinue = await this.middleware(message, command);\n if (!shouldContinue) return;\n }\n\n\n if (message.inGuild()) {\n const [executer, clientMember] = await Promise.all([\n command.memberPermissions ? message.guild.members.fetch({ user: message.author.id, force: false }) : null,\n command.clientPermissions ? message.guild.members.fetchMe({ force: false }) : null,\n ]);\n if ((command.memberPermissions && !executer) || (command.clientPermissions && !clientMember)) return;\n\n if (command.memberPermissions) {\n const memberPerms = resolvePermissions(executer!, message.channel);\n if (!memberPerms.has(command.memberPermissions)) {\n const missing = memberPerms.missing(command.memberPermissions);\n\n if (typeof this.handlers.onMemberPermissions === 'function') return this.handlers.onMemberPermissions(message, command, missing);\n return message.reply({ content: 'You don\\'t have the required permission(s) to use this command.' }).then(m => {\n setTimeout(() => m.delete().catch(e => null), 10000);\n }).catch(() => null);\n }\n }\n\n if (command.clientPermissions) {\n const clientPerms = resolvePermissions(clientMember!, message.channel);\n if (!clientPerms.has(command.clientPermissions)) { \n const missing = clientPerms.missing(command.clientPermissions);\n\n if (typeof this.handlers.onClientPermissions === 'function') return this.handlers.onClientPermissions(message, command, missing);\n return message.reply({ content: `${clientMember!.displayName} requires ${formatPermissions(missing)} permission(s) to run this command.` }).then(m => {\n setTimeout(() => m.delete().catch(e => null), 10000);\n }).catch(() => null);\n }\n }\n }\n\n if (command.cooldown && command.cooldown > 1000) {\n if (!this.client.cooldowns.has(commandId)) this.client.cooldowns.set(commandId, new Collection());\n const commandCooldowns = this.client.cooldowns.get(commandId);\n \n if (commandCooldowns) {\n if (commandCooldowns.has(message.author.id)) {\n const expiresAt = new Date((commandCooldowns.get(message.author.id) || 0) + command.cooldown).valueOf();\n const now = Date.now();\n\n if (expiresAt - now > 1000) {\n if (typeof this.handlers.onCooldown === 'function') return this.handlers.onCooldown(message, command, new Date(expiresAt));\n return message.reply({ content: `Slow down and try the Command Again **${unixTimestamp(new Date(expiresAt), 'R')}**.` }).then(m => {\n setTimeout(() => m.delete().catch(e => null), expiresAt - Date.now());\n });\n }\n }\n commandCooldowns.set(message.author.id, new Date().valueOf());\n setTimeout(() => commandCooldowns.delete(message.author.id), command.cooldown);\n }\n }\n\n\n try {\n this.emit('execute', { context: message, command });\n if (message.inGuild() && command.contexts.includes('Guild')) { \n await command.execute(this.client, message, args);\n } \n else if (!message.inGuild() && command.contexts.includes('BotDM')) {\n await command.execute(this.client, message as any, args);\n }\n this.emit('success', { context: message, command });\n } catch (error) {\n this.emit('error', { context: message, command, error });\n }\n }\n\n\n private async _handleInteraction(interaction: Interaction) {\n if (!interaction.isChatInputCommand() && !interaction.isContextMenuCommand()) return;\n\n const commandId = `${this._getCommandId(interaction)}:${interaction.commandName}`;\n const command = this.client.commands.get(commandId);\n if (!command || command.disabled || command.commandType === 'Message') {\n this.emit('unknown', interaction);\n return;\n }\n\n if (this.middleware) {\n const shouldContinue = await this.middleware(interaction, command);\n if (!shouldContinue) return;\n }\n\n\n if (!interaction.inCachedGuild() && (command.commandContexts?.includes('Guild') || command.commandContexts?.includes(0))) return;\n if (command.clientPermissions && interaction.inCachedGuild()) {\n const clientMember = await interaction.guild.members.fetchMe({ force: false });\n const clientPerms = resolvePermissions(clientMember, interaction.channel);\n\n if (!clientPerms.has(command.clientPermissions)) {\n const missing = clientPerms.missing(command.clientPermissions);\n if (typeof this.handlers.onClientPermissions === 'function') return this.handlers.onClientPermissions(interaction, command, missing);\n return interaction.reply({ content: `${clientMember.displayName} requires ${formatPermissions(missing)} permission(s) to run this command.`, flags: MessageFlags.Ephemeral });\n }\n }\n \n\n if (command.cooldown && command.cooldown > 1000) {\n if (!this.client.cooldowns.has(commandId)) this.client.cooldowns.set(commandId, new Collection());\n const commandCooldowns = this.client.cooldowns.get(commandId);\n \n if (commandCooldowns) {\n if (commandCooldowns.has(interaction.user.id)) {\n const expiresAt = new Date((commandCooldowns.get(interaction.user.id) || 0) + command.cooldown).valueOf();\n \n if (expiresAt - Date.now() > 1000) {\n if (typeof this.handlers.onCooldown === 'function') return this.handlers.onCooldown(interaction, command, new Date(expiresAt));\n return await interaction.reply({ content: `Slow down and try the Command Again **${unixTimestamp(new Date(expiresAt), 'R')}**.`, flags: MessageFlags.Ephemeral });\n }\n }\n commandCooldowns.set(interaction.user.id, new Date().valueOf());\n setTimeout(() => commandCooldowns.delete(interaction.user.id), command.cooldown);\n }\n }\n\n\n try {\n this.emit('execute', { context: interaction, command });\n await command.execute(this.client, interaction as any);\n this.emit('success', { context: interaction, command });\n } catch (error) {\n this.emit('error', { context: interaction, command, error });\n }\n }\n\n\n private _getCommandId(interaction: Interaction) {\n if (interaction.isChatInputCommand()) return 'Slash';\n else if (interaction.isUserContextMenuCommand()) return 'ContextUser';\n else if (interaction.isMessageContextMenuCommand()) return 'ContextMessage';\n return 'unknown';\n }\n\n private _getCommandData(command: (FrameworkSlashCommand | FrameworkContextCommand)) {\n const base = {\n name: command.name,\n defaultMemberPermissions: command.memberPermissions ?? null,\n contexts: resolveCommandContexts(command.commandContexts),\n integrationTypes: resolveIntegrationTypes(command.integrationTypes),\n nameLocalizations: command.nameLocalizations,\n descriptionLocalizations: command.descriptionLocalizations,\n };\n\n if (command.commandType === 'Slash') {\n return {\n ...base,\n type: ApplicationCommandType.ChatInput as const,\n description: command.description,\n options: command.options,\n };\n } else if (command.commandType === 'ContextMessage') {\n return {\n ...base,\n type: ApplicationCommandType.Message as const,\n };\n }\n\n return {\n ...base,\n type: ApplicationCommandType.User as const,\n };\n } \n}\n\n\n/**\n * Emitted when a command is executed\n * @event CommandsModule#execute\n * @param {FrameworkCommand} context.command The command\n * @param {Message|CommandInteraction} context.context The interaction / message\n */\n\n/**\n * Emitted when a command finishes execution successfully\n * @event CommandsModule#success\n * @param {FrameworkCommand} context.command The command\n * @param {Message|CommandInteraction} context.context The interaction / message\n */\n\n/**\n * Emitted when a command throws an error\n * @event CommandsModule#error\n * @param {FrameworkCommand} context.command The command\n * @param {Message|CommandInteraction} context.context The interaction / message\n * @param {any} context.error The error\n */\n\n/**\n * Emitted when an interaction arrives with a command that is not loaded\n * @event CommandsModule#unknown\n * @param {CommandInteraction} interaction The interaction\n */","import { FrameworkError, FrameworkTypeError } from '../../core/FrameworkError';\nimport { AutocompleterOptions } from '../../types';\n\n\nexport function Autocompleter(options: AutocompleterOptions) {\n \n if (!options) throw new FrameworkError('NoOptions');\n if (typeof options !== 'object') throw new FrameworkTypeError('InvalidType', 'options', 'object', typeof options);\n \n if (!options.name || !options.name?.length) throw new FrameworkError('InvalidOption', 'name');\n if (typeof options.name !== 'string') throw new FrameworkTypeError('InvalidType', 'name', 'string', typeof options.name);\n\n if (!options.execute) throw new FrameworkError('InvalidOption', 'execute');\n if (typeof options.execute !== 'function') throw new FrameworkTypeError('InvalidType', 'execute', 'function', typeof options.execute);\n \n if (options.commands && !Array.isArray(options.commands)) throw new FrameworkTypeError('InvalidType', 'commands', 'string[]', typeof options.commands);\n if (options.disabled !== undefined && typeof options.disabled !== 'boolean') throw new FrameworkTypeError('InvalidType', 'disabled', 'boolean', typeof options.disabled);\n\n return {\n id: options.name,\n name: options.name,\n disabled: options.disabled ?? false,\n execute: options.execute,\n }\n}","import { \n APIApplicationCommandOption, AutocompleteInteraction, ChatInputCommandInteraction, CommandInteraction, LocalizationMap, Message, \n MessageContextMenuCommandInteraction, PermissionResolvable, PermissionsString, SlashCommandOptionsOnlyBuilder, UserContextMenuCommandInteraction,\n} from 'discord.js';\nimport { FrameworkClient } from '../core/FrameworkClient';\n\n\nexport const CommandTypes = ['Slash', 'Message', 'ContextMessage', 'ContextUser'] as const;\nexport const CommandContexts = ['Guild', 'BotDM', 'PrivateChannel', 0, 1, 2] as const;\nexport const IntegrationTypes = ['GuildInstall', 'UserInstall', 0, 1] as const;\nexport const CommandScopes = ['default', 'guild', 'global'] as const;\nexport const MessageCommandContexts = ['Guild', 'BotDM'] as const;\n\nexport type CommandType = typeof CommandTypes[number];\nexport type CommandContext = typeof CommandContexts[number];\nexport type IntegrationType = typeof IntegrationTypes[number];\nexport type CommandScope = typeof CommandScopes[number];\n\ntype Result = unknown | void;\ntype MessageCommandContext = typeof MessageCommandContexts[number];\n\n\nexport interface BaseCommandOptions {\n /** The Name of the Command */\n name: string;\n /** The Description of the Command */\n description: string;\n /** The Type of the Command */\n commandType: CommandType;\n /** The Cooldown of the Command (in MS) */\n cooldown?: number;\n /** Permissions required by the User to use this Command */\n memberPermissions?: PermissionResolvable;\n /** Permissions required by the Application Client to execute this Command */\n clientPermissions?: PermissionResolvable;\n /** Whether this command is Disabled */\n disabled?: boolean;\n}\n\ninterface BaseAppCommandOptions extends BaseCommandOptions {\n /**\n * Where this Application Command can be registered\n * - `default` - In both Guild & Global Commands\n * - `guild` - In only Guild Commands\n * - `global` - In only Global Commands\n */\n commandScope: CommandScope;\n /**\n * Where this Application Command can be used\n * - `Guild` | `(0)` - In Guilds\n * - `BotDM` | `(1)` - In Application DMs\n * - `PrivateChannel` | `(2)` - In Other's DMs & Group DMs\n */\n commandContexts?: CommandContext[];\n /**\n * Where this Application Command can be integrated\n * - `GuildInstall` | `(0)` - App is installable to servers\n * - `UserInstall` | `(1)` - App is installable to users\n */\n integrationTypes?: IntegrationType[];\n /** The Name Localizations of the Command */\n nameLocalizations?: LocalizationMap;\n /** The Description Localizations of the Command */\n descriptionLocalizations?: LocalizationMap;\n}\n\n\ntype InferMessage<C> = (C extends MessageCommandContext[]\n ? 'Guild' extends C[number] \n ? 'BotDM' extends C[number] \n ? Message<boolean> : Message<true>\n : Message<false>\n : Message<boolean>\n);\n\nexport interface MessageCommandOptions<C extends MessageCommandContext[] | undefined = ['Guild']> extends BaseCommandOptions {\n commandType: 'Message';\n /** The Aliases of the Command */\n aliases?: string[];\n /** The Usage of the Command */\n usage?: string;\n /** Whether the command is Developer Only */\n devOnly?: boolean;\n /**\n * Where this Message Command can be used\n * - `BotDM` - In Application DMs\n * - `Guild` - In Guilds\n */\n contexts?: C;\n execute: (client: FrameworkClient<true>, message: InferMessage<C>, args: string[]) => Promise<Result> | Result;\n}\n\n\nexport type SlashOptionsInput = (\n | APIApplicationCommandOption[]\n | { toJSON(): APIApplicationCommandOption }[]\n | ((builder: SlashCommandOptionsOnlyBuilder) => SlashCommandOptionsOnlyBuilder)\n);\n\nexport interface SlashCommandOptions extends BaseAppCommandOptions {\n commandType: 'Slash';\n /** The Application Command Options of this Command */\n options?: SlashOptionsInput;\n execute: (client: FrameworkClient<true>, interaction: ChatInputCommandInteraction<'cached'>) => Promise<Result> | Result;\n autocomplete?: (client: FrameworkClient<true>, interaction: AutocompleteInteraction<'cached'>) => Promise<Result> | Result;\n}\n\n\nexport interface ContextMessageCommandOptions extends Omit<BaseAppCommandOptions, 'description'> {\n commandType: 'ContextMessage';\n /** The Description of the Command */\n description?: string;\n execute: (client: FrameworkClient<true>, interaction: MessageContextMenuCommandInteraction<'cached'>) => Promise<Result> | Result;\n}\n\nexport interface ContextUserCommandOptions extends Omit<BaseAppCommandOptions, 'description'> {\n commandType: 'ContextUser';\n /** The Description of the Command */\n description?: string;\n execute: (client: FrameworkClient<true>, interaction: UserContextMenuCommandInteraction<'cached'>) => Promise<Result> | Result;\n}\nexport type ContextCommandOptions = (ContextMessageCommandOptions | ContextUserCommandOptions);\n\n\ninterface BaseCommandMeta {\n id: string;\n filepath: string;\n disabled: boolean;\n}\n\nexport type FrameworkSlashCommand = SlashCommandOptions & BaseCommandMeta & {\n options: APIApplicationCommandOption[];\n};\nexport type FrameworkMessageCommand = MessageCommandOptions & BaseCommandMeta & {\n devOnly: boolean;\n contexts: MessageCommandContext[];\n};\nexport type FrameworkContextCommand = ContextCommandOptions & BaseCommandMeta;\nexport type FrameworkCommand = (FrameworkSlashCommand | FrameworkMessageCommand | FrameworkContextCommand);\n\n\nexport type CommandMiddleware = (context: Message | CommandInteraction, command: FrameworkCommand) => Promise<boolean> | boolean;\nexport interface CommandCustomHandlers {\n onCooldown?: (context: Message | CommandInteraction, command: FrameworkCommand, expirationTime: Date) => any;\n onMemberPermissions?: (context: Message, command: FrameworkCommand, missingPermissions: PermissionsString[]) => any;\n onClientPermissions?: (context: Message | CommandInteraction, command: FrameworkCommand, missingPermissions: PermissionsString[]) => any;\n}","import { ContextCommandOptions, CommandTypes, CommandScopes, CommandContexts, IntegrationTypes } from '../../types';\nimport { ApplicationIntegrationType, InteractionContextType } from 'discord.js';\nimport { FrameworkError, FrameworkTypeError } from '../../core/FrameworkError';\nimport { BaseCommand } from './BaseCommand';\n\n\nexport function ContextCommand(options: ContextCommandOptions) {\n\n if (!options.commandType) throw new FrameworkError('InvalidOption', 'commandType');\n if (options.commandType !== CommandTypes[2] && options.commandType !== CommandTypes[3]) throw new FrameworkError('InvalidValue', 'commandType', CommandTypes);\n\n if (!options.commandScope) throw new FrameworkError('InvalidOption', 'commandScope');\n if (typeof options.commandScope !== 'string' || !CommandScopes.includes(options.commandScope)) throw new FrameworkError('InvalidValue', 'commandScope', CommandScopes);\n\n if (options.commandContexts && !Array.isArray(options.commandContexts)) throw new FrameworkTypeError('InvalidType', 'commandContexts', 'Array', typeof options.commandContexts);\n if (options.commandContexts && options.commandContexts.some(c => !CommandContexts.includes(c))) throw new FrameworkError('InvalidValues', 'commandContexts', CommandContexts);\n\n if (options.integrationTypes && !Array.isArray(options.integrationTypes)) throw new FrameworkTypeError('InvalidType', 'integrationTypes', 'Array', typeof options.integrationTypes);\n if (options.integrationTypes && options.integrationTypes.some(c => !IntegrationTypes.includes(c))) throw new FrameworkError('InvalidValues', 'integrationTypes', IntegrationTypes);\n\n if (!options.execute) throw new FrameworkError('InvalidOption', 'execute');\n if (typeof options.execute !== 'function') throw new FrameworkTypeError('InvalidType', 'execute', 'function', typeof options.execute);\n\n if (!options.commandContexts || !options.commandContexts.length) options.commandContexts = [InteractionContextType.Guild];\n if (!options.integrationTypes || !options.integrationTypes.length) options.integrationTypes = [ApplicationIntegrationType.GuildInstall];\n\n return BaseCommand({\n ...options,\n commandType: options.commandType,\n description: options.description ?? 'no description',\n });\n}","import { FrameworkError, FrameworkTypeError } from '../../core/FrameworkError';\nimport { isPermissionResolvable, normalizeCommandName } from '../../utils';\nimport { BaseCommandOptions, CommandTypes } from '../../types';\n\n\nexport function BaseCommand(options: BaseCommandOptions) {\n\n if (!options) throw new FrameworkError('NoOptions');\n if (typeof options !== 'object') throw new FrameworkTypeError('InvalidType', 'options', 'object', typeof options);\n\n if (!options.name || !options.name?.length) throw new FrameworkError('InvalidOption', 'name');\n if (typeof options.name !== 'string') throw new FrameworkTypeError('InvalidType', 'name', 'string', typeof options.name);\n\n if (!options.description || !options.description?.length) throw new FrameworkError('InvalidOption', 'description');\n if (typeof options.description !== 'string') throw new FrameworkTypeError('InvalidType', 'description', 'string', typeof options.description);\n\n if (!options.commandType) throw new FrameworkError('InvalidOption', 'commandType');\n if (!CommandTypes.includes(options.commandType)) throw new FrameworkError('InvalidValue', 'commandType', CommandTypes);\n\n if (options.memberPermissions !== undefined && !isPermissionResolvable(options.memberPermissions)) {\n throw new FrameworkTypeError('InvalidType', 'memberPermissions', 'PermissionResolvable', typeof options.memberPermissions);\n }\n if (options.clientPermissions !== undefined && !isPermissionResolvable(options.clientPermissions)) {\n throw new FrameworkTypeError('InvalidType', 'clientPermissions', 'PermissionResolvable', typeof options.clientPermissions);\n }\n\n if (options.cooldown && typeof options.cooldown !== 'number') throw new FrameworkTypeError('InvalidType', 'cooldown', 'number', typeof options.cooldown);\n if (options.disabled !== undefined && typeof options.disabled !== 'boolean') throw new FrameworkTypeError('InvalidType', 'disabled', 'boolean', typeof options.disabled);\n\n return {\n ...options,\n id: `${options.commandType}:${options.name}`,\n name: normalizeCommandName(options.name, options.commandType),\n description: options.description,\n commandType: options.commandType,\n memberPermissions: options.memberPermissions ?? undefined,\n clientPermissions: options.clientPermissions ?? undefined,\n cooldown: options.cooldown ?? undefined,\n disabled: options.disabled ?? false,\n };\n}","import { MessageCommandOptions as CommandOptions, MessageCommandContexts } from '../../types';\nimport { FrameworkError, FrameworkTypeError } from '../../core/FrameworkError';\nimport { BaseCommand } from './BaseCommand';\n\n\ntype MessageCommandOptions = Omit<CommandOptions, 'commandType'>;\nexport function MessageCommand(options: MessageCommandOptions) {\n\n if (options.aliases && !Array.isArray(options.aliases)) throw new FrameworkTypeError('InvalidType', 'aliases', 'array', typeof options.aliases);\n if (options.usage && typeof options.usage !== 'string') throw new FrameworkTypeError('InvalidType', 'usage', 'string', typeof options.usage);\n \n if (options.contexts && !Array.isArray(options.contexts)) throw new FrameworkTypeError('InvalidType', 'contexts', 'array', typeof options.contexts);\n if (options.contexts && options.contexts.some(c => !MessageCommandContexts.includes(c))) throw new FrameworkError('InvalidValues', 'contexts', MessageCommandContexts);\n\n if (!options.execute) throw new FrameworkError('InvalidOption', 'execute');\n if (typeof options.execute !== 'function') throw new FrameworkTypeError('InvalidType', 'execute', 'function', typeof options.execute);\n if (options.devOnly !== undefined && typeof options.devOnly !== 'boolean') throw new FrameworkTypeError('InvalidType', 'devOnly', 'boolean', typeof options.devOnly);\n\n if (!options.contexts) options.contexts = ['Guild'];\n if (options.devOnly === undefined) options.devOnly = false;\n\n return BaseCommand({\n ...options,\n commandType: 'Message',\n });\n}","import { CommandScopes, CommandContexts, IntegrationTypes, SlashCommandOptions as CommandOptions } from '../../types';\nimport { ApplicationIntegrationType, InteractionContextType } from 'discord.js';\nimport { FrameworkError, FrameworkTypeError } from '../../core/FrameworkError';\nimport { normalizeOptions } from '../../utils';\nimport { BaseCommand } from './BaseCommand';\n\n\ntype SlashCommandOptions = Omit<CommandOptions, 'commandType'>;\nexport function SlashCommand(options: SlashCommandOptions) {\n\n if (!options.commandScope) throw new FrameworkError('InvalidOption', 'commandScope');\n if (typeof options.commandScope !== 'string' || !CommandScopes.includes(options.commandScope)) throw new FrameworkError('InvalidValue', 'commandScope', CommandScopes);\n\n if (options.commandContexts && !Array.isArray(options.commandContexts)) throw new FrameworkTypeError('InvalidType', 'commandContexts', 'Array', typeof options.commandContexts);\n if (options.commandContexts && options.commandContexts.some(c => !CommandContexts.includes(c))) throw new FrameworkError('InvalidValues', 'commandContexts', CommandContexts);\n\n if (options.integrationTypes && !Array.isArray(options.integrationTypes)) throw new FrameworkTypeError('InvalidType', 'integrationTypes', 'Array', typeof options.integrationTypes);\n if (options.integrationTypes && options.integrationTypes.some(c => !IntegrationTypes.includes(c))) throw new FrameworkError('InvalidValues', 'integrationTypes', IntegrationTypes);\n\n if (!options.execute) throw new FrameworkError('InvalidOption', 'execute');\n if (typeof options.execute !== 'function') throw new FrameworkTypeError('InvalidType', 'execute', 'function', typeof options.execute);\n\n options.options = normalizeOptions(options.options);\n if (!options.commandContexts || !options.commandContexts.length) options.commandContexts = [InteractionContextType.Guild];\n if (!options.integrationTypes || !options.integrationTypes.length) options.integrationTypes = [ApplicationIntegrationType.GuildInstall];\n \n return BaseCommand({\n ...options,\n commandType: 'Slash',\n });\n}","import { FrameworkError, FrameworkTypeError } from '../../core/FrameworkError';\nimport { ListenerOptions } from '../../types';\nimport { ClientEvents } from 'discord.js';\n\n\nexport function Listener<T extends keyof ClientEvents>(options: ListenerOptions<T>) {\n\n if (!options) throw new FrameworkError('NoOptions');\n if (typeof options !== 'object') throw new FrameworkTypeError('InvalidType', 'options', 'object', typeof options);\n\n if (!options.name || !options.name?.length) throw new FrameworkError('InvalidOption', 'name');\n if (typeof options.name !== 'string') throw new FrameworkTypeError('InvalidType', 'name', 'string', typeof options.name);\n\n if (!options.execute) throw new FrameworkError('InvalidOption', 'execute');\n if (typeof options.execute !== 'function') throw new FrameworkTypeError('InvalidType', 'execute', 'function', typeof options.execute);\n\n if (options.once !== undefined && typeof options.once !== 'boolean') throw new FrameworkTypeError('InvalidType', 'once', 'boolean', typeof options.once);\n if (options.disabled !== undefined && typeof options.disabled !== 'boolean') throw new FrameworkTypeError('InvalidType', 'disabled', 'boolean', typeof options.disabled);\n\n return {\n id: `Client:${options.name}`,\n name: options.name,\n once: options.once ?? false,\n disabled: options.disabled ?? false,\n execute: options.execute,\n } \n}","import { Message } from 'discord.js';\nimport * as MessageExtensions from './Message';\n\nObject.defineProperties(Message.prototype, {\n prefix: { get: MessageExtensions.prefix, configurable: true },\n isDeveloper: { value: MessageExtensions.isDeveloper, writable: true, configurable: true },\n awaitMemberResponse: { value: MessageExtensions.awaitMemberResponse, writable: true, configurable: true },\n createModalSubmitCollector: { value: MessageExtensions.createModalSubmitCollector, writable: true, configurable: true },\n awaitModalSubmitComponent: { value: MessageExtensions.awaitModalSubmitComponent, writable: true, configurable: true },\n});","import { Message, MessageCollector, Message as DiscordMessage, InteractionCollector, InteractionType, ModalSubmitInteraction } from 'discord.js';\nimport { AwaitMemberResponseOptions, ModalCollectorOptions } from '../types';\n\nexport function prefix(this: Message) {\n return this.client.prefix;\n}\n\nexport function isDeveloper(this: Message) {\n return this.client.developers.includes(this.author.id);\n}\n\nexport function awaitMemberResponse(this: Message, options: AwaitMemberResponseOptions = {}) {\n return new Promise<DiscordMessage>((resolve, reject) => {\n if (!this.channel) {\n return reject(new Error('Channel not available for this message.'));\n }\n\n const collector = new MessageCollector(this.channel, {\n time: 60000,\n filter: (m) => m.author.id === this.author.id && (m.content || '').length > 0,\n ...options,\n max: 1\n });\n\n collector.on('end', (messages, reason) => {\n const message = messages.first();\n if (message) {\n if (options.deleteMessage) message.delete().catch(() => null);\n resolve(message);\n } else {\n reject(new Error(reason));\n }\n });\n })\n}\n\nexport function createModalSubmitCollector(this: Message, options: ModalCollectorOptions = {}) {\n return new InteractionCollector<ModalSubmitInteraction>(this.client, { \n ...options, \n interactionType: InteractionType.ModalSubmit, \n message: this\n });\n}\n\nexport function awaitModalSubmitComponent(this: Message, options: ModalCollectorOptions = {}) {\n return new Promise<ModalSubmitInteraction>((resolve, reject) => {\n const collector = new InteractionCollector<ModalSubmitInteraction>(this.client, {\n time: 60000, \n filter: (i) => i.user.id === this.author.id, \n ...options, \n interactionType: InteractionType.ModalSubmit, \n message: this, \n max: 1\n });\n\n collector.on('end', (interactions, reason) => {\n const interaction = interactions.first();\n if (interaction) resolve(interaction);\n else reject(new Error(reason));\n })\n })\n}","export { FrameworkClient } from './core/FrameworkClient';\nexport { Autocompleter } from './builders/autocompleters/Autocompleter';\nexport { ContextCommand } from './builders/commands/ContextCommand';\nexport { MessageCommand } from './builders/commands/MessageCommand';\nexport { SlashCommand } from './builders/commands/SlashCommand';\nexport { Listener } from './builders/listeners/Listener';\nimport './extensions';\n\n\nexport type {\n FrameworkAutocompleter,\n FrameworkCommand,\n FrameworkSlashCommand,\n FrameworkMessageCommand,\n FrameworkContextCommand,\n FrameworkListener,\n} from './types';\n\n\nexport {\n SlashCommandAttachmentOption as AttachmentOption,\n SlashCommandBooleanOption as BooleanOption,\n SlashCommandChannelOption as ChannelOption,\n SlashCommandIntegerOption as IntegerOption,\n SlashCommandMentionableOption as MentionableOption,\n SlashCommandNumberOption as NumberOption,\n SlashCommandRoleOption as RoleOption,\n SlashCommandStringOption as StringOption,\n SlashCommandUserOption as UserOption,\n SlashCommandSubcommandBuilder as SubcommandBuilder,\n SlashCommandSubcommandGroupBuilder as SubcommandGroupBuilder,\n} from 'discord.js';"],"mappings":";;;;;;;;AACA,SAAuB,cAAAA,aAAY,UAAU,qBAAqB;;;ACDlE,OAAO,UAAU;AACjB,OAAO,SAAS;AAChB,OAAO,QAAQ;AAGf,eAAsB,UAAU,KAAgC;AAC9D,MAAI,CAAC,GAAG,WAAW,GAAG,EAAG,QAAO,CAAC;AAEjC,QAAM,QAAkB,CAAC;AACzB,QAAM,QAAQ,GAAG,YAAY,KAAK,EAAE,eAAe,KAAK,CAAC;AAEzD,aAAW,QAAQ,OAAO;AACxB,UAAM,WAAW,KAAK,KAAK,KAAK,KAAK,IAAI;AACzC,QAAI,KAAK,YAAY,EAAG,OAAM,KAAK,GAAI,MAAM,UAAU,QAAQ,CAAE;AAAA,aACxD,KAAK,KAAK,SAAS,KAAK,KAAK,KAAK,KAAK,SAAS,KAAK,EAAG,OAAM,KAAK,QAAQ;AAAA,EACtF;AACA,SAAO;AACT;AAQO,SAAS,UAAU,KAAa;AACrC,SAAO,GAAG,WAAW,GAAG;AAC1B;AAEO,SAAS,eAAe,OAAiB;AAC9C,SAAO,KAAK,QAAQ,GAAG,KAAK;AAC9B;AAEO,SAAS,cAAc,UAAkB;AAC9C,SAAO,IAAI,cAAc,QAAQ;AACnC;;;ACnCA,SAAsC,4BAA4B,wBAAwB,2BAA2B;AAI9G,SAAS,cAAc,MAAmB,OAAuB,KAAa;AACnF,SAAO,MAAM,KAAK,MAAM,IAAI,KAAK,IAAI,EAAE,QAAQ,IAAI,GAAI,CAAC,IAAI,IAAI;AAClE;AAEO,SAAS,kBAAkB,QAAgBC,SAAiB;AACjE,SAAO,IAAI,OAAO,SAAS,MAAM,IAAIA,UAAS,IAA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AAM,cAAc,KAAK;AAAA,EACtH,2BAA2B,EAAE,OAAyB,2BAA2B,UAAU,MAAM,cAAc,KAAK;AACtH,CAAC;;;AEUD;AAAA,EACkC;AAAA,EACH;AAAA,EACA;AAAA,EACA;AAAA,EACI;AAAA,EACL;AAAA,EACF;AAAA,EACE;AAAA,EACF;AAAA,EACO;AAAA,EACK;AAAA,OACjC;","names":["Collection","prefix","EventEmitter","EventEmitter","Collection","ApplicationIntegrationType","InteractionContextType","InteractionContextType","ApplicationIntegrationType","ApplicationIntegrationType","InteractionContextType","InteractionContextType","ApplicationIntegrationType","Message","messages","Message"]}
package/package.json CHANGED
@@ -1,46 +1,54 @@
1
1
  {
2
2
  "name": "@guardbot/framework",
3
- "version": "1.1.2",
3
+ "version": "2.0.0",
4
4
  "description": "A simple framework made for building discord bots with discord.js.",
5
- "main": "./build/index.js",
6
- "module": "./build/index.mjs",
5
+ "type": "module",
6
+ "main": "./build/index.cjs",
7
+ "module": "./build/index.js",
7
8
  "types": "./build/index.d.ts",
8
9
  "exports": {
9
10
  ".": {
10
- "import": {
11
- "types": "./build/index.d.mts",
12
- "default": "./build/index.mjs"
13
- },
14
- "require": {
15
- "types": "./build/index.d.ts",
16
- "default": "./build/index.js"
17
- }
11
+ "types": "./build/index.d.ts",
12
+ "import": "./build/index.js",
13
+ "require": "./build/index.cjs"
18
14
  }
19
15
  },
20
- "scripts": {
21
- "build": "tsup"
22
- },
23
16
  "files": [
24
- "build/"
17
+ "build",
18
+ "README.md"
25
19
  ],
20
+ "scripts": {
21
+ "clean": "rimraf build",
22
+ "build": "yarn run clean && tsup",
23
+ "test": "tsx tests/index.ts"
24
+ },
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
26
28
  "repository": {
27
29
  "type": "git",
28
30
  "url": "git+https://github.com/guardbotgg/framework.git"
29
31
  },
30
- "keywords": [],
31
- "author": "aniket091",
32
+ "keywords": [
33
+ "discord",
34
+ "framework",
35
+ "discord.js"
36
+ ],
32
37
  "license": "MIT",
38
+ "author": "Aniket",
39
+ "homepage": "https://github.com/guardbotgg/framework#readme",
33
40
  "bugs": {
34
41
  "url": "https://github.com/guardbotgg/framework/issues"
35
42
  },
36
- "homepage": "https://github.com/guardbotgg/framework#readme",
37
43
  "peerDependencies": {
38
- "discord.js": "^14.25.1"
44
+ "discord.js": "^14"
39
45
  },
40
46
  "devDependencies": {
41
47
  "@types/node": "^20.0.0",
42
- "discord.js": "^14.25.1",
48
+ "discord.js": "^14",
49
+ "rimraf": "^5.0.5",
50
+ "dotenv": "^17.3.1",
43
51
  "tsup": "^8.5.0",
44
52
  "typescript": "^5.9.3"
45
53
  }
46
- }
54
+ }