@sapphire/framework
Advanced tools
Comparing version 2.0.0-next.3b3fcba5.0 to 2.0.0-next.3ce4d716.0
@@ -1,2 +0,2 @@ | ||
/* Version: 2.0.0-next.3b3fcba5.0 - June 9, 2021 18:53:01 */ | ||
/* Version: 2.0.0-next.3ce4d716.0 - July 18, 2021 07:21:45 */ | ||
'use strict'; | ||
@@ -30,4 +30,4 @@ | ||
tslib_1.__exportStar(require("./lib/structures/CommandStore"), exports); | ||
tslib_1.__exportStar(require("./lib/structures/Event"), exports); | ||
tslib_1.__exportStar(require("./lib/structures/EventStore"), exports); | ||
tslib_1.__exportStar(require("./lib/structures/Listener"), exports); | ||
tslib_1.__exportStar(require("./lib/structures/ListenerStore"), exports); | ||
tslib_1.__exportStar(require("./lib/structures/ExtendedArgument"), exports); | ||
@@ -48,2 +48,2 @@ tslib_1.__exportStar(require("./lib/structures/Precondition"), exports); | ||
tslib_1.__exportStar(require("./lib/utils/preconditions/PreconditionContainerSingle"), exports); | ||
exports.version = '2.0.0-next.3b3fcba5.0'; | ||
exports.version = '2.0.0-next.3ce4d716.0'; |
@@ -11,3 +11,3 @@ "use strict"; | ||
/** | ||
* The argument parser to be used in [[Command]]. | ||
* The argument parser to be used in {@link Command}. | ||
*/ | ||
@@ -149,9 +149,9 @@ class Args { | ||
* console.log(args.getFlags('f')); | ||
* >>> true | ||
* // >>> true | ||
* | ||
* console.log(args.getFlags('g', 'h')); | ||
* >>> true | ||
* // >>> true | ||
* | ||
* console.log(args.getFlags('h')); | ||
* >>> false | ||
* // >>> false | ||
* ``` | ||
@@ -169,9 +169,9 @@ */ | ||
* console.log(args.getOption('a')); | ||
* >>> '1' | ||
* // >>> '1' | ||
* | ||
* console.log(args.getOption('b', 'c')); | ||
* >>> '2' | ||
* // >>> '2' | ||
* | ||
* console.log(args.getOption('d')); | ||
* >>> null | ||
* // >>> null | ||
* ``` | ||
@@ -189,9 +189,9 @@ */ | ||
* console.log(args.getOptions('a')); | ||
* >>> ['1', '1'] | ||
* // >>> ['1', '1'] | ||
* | ||
* console.log(args.getOptions('b', 'c')); | ||
* >>> ['2', '3'] | ||
* // >>> ['2', '3'] | ||
* | ||
* console.log(args.getOptions('d')); | ||
* >>> null | ||
* // >>> null | ||
* ``` | ||
@@ -242,3 +242,3 @@ */ | ||
* Resolves an argument. | ||
* @param arg The argument name or [[IArgument]] instance. | ||
* @param arg The argument name or {@link IArgument} instance. | ||
*/ | ||
@@ -252,3 +252,3 @@ resolveArgument(arg) { | ||
* Converts a callback into an usable argument. | ||
* @param cb The callback to convert into an [[IArgument]]. | ||
* @param cb The callback to convert into an {@link IArgument}. | ||
*/ | ||
@@ -259,3 +259,3 @@ static make(cb, name = '') { | ||
/** | ||
* Constructs an [[Ok]] result. | ||
* Constructs an {@link Ok} result. | ||
* @param value The value to pass. | ||
@@ -267,3 +267,3 @@ */ | ||
/** | ||
* Constructs an [[Err]] result containing an [[ArgumentError]]. | ||
* Constructs an {@link Err} result containing an {@link ArgumentError}. | ||
* @param options The options for the argument error. | ||
@@ -270,0 +270,0 @@ */ |
@@ -10,3 +10,3 @@ "use strict"; | ||
const CommandStore_1 = require("./structures/CommandStore"); | ||
const EventStore_1 = require("./structures/EventStore"); | ||
const ListenerStore_1 = require("./structures/ListenerStore"); | ||
const PreconditionStore_1 = require("./structures/PreconditionStore"); | ||
@@ -19,8 +19,8 @@ const StoreRegistry_1 = require("./structures/StoreRegistry"); | ||
/** | ||
* The base [[Client]] extension that makes Sapphire work. When building a Discord bot with the framework, the developer | ||
* The base {@link Client} extension that makes Sapphire work. When building a Discord bot with the framework, the developer | ||
* must either use this class, or extend it. | ||
* | ||
* Sapphire also automatically detects the folders to scan for pieces, please read | ||
* [[SapphireClient.registerUserDirectories]] for reference. This method is called at the start of the | ||
* [[SapphireClient.login]] method. | ||
* {@link SapphireClient.registerUserDirectories} for reference. This method is called at the start of the | ||
* {@link SapphireClient.login} method. | ||
* | ||
@@ -67,3 +67,3 @@ * @see {@link SapphireClientOptions} for all options available to the Sapphire Client. You can also provide all of discord.js' [ClientOptions](https://discord.js.org/#/docs/main/stable/typedef/ClientOptions) | ||
constructor(options = {}) { | ||
var _a, _b, _c, _d, _e, _f; | ||
var _a, _b, _c, _d, _e, _f, _g; | ||
super(options); | ||
@@ -82,5 +82,8 @@ /** | ||
pieces_1.container.logger = this.logger; | ||
if ((_e = options.enableLoaderTraceLoggings) !== null && _e !== void 0 ? _e : pieces_1.container.logger.has(10 /* Trace */)) { | ||
pieces_1.Store.logger = pieces_1.container.logger.trace.bind(pieces_1.container.logger); | ||
} | ||
this.stores = new StoreRegistry_1.StoreRegistry(); | ||
pieces_1.container.stores = this.stores; | ||
this.fetchPrefix = (_e = options.fetchPrefix) !== null && _e !== void 0 ? _e : (() => { var _a; return (_a = this.options.defaultPrefix) !== null && _a !== void 0 ? _a : null; }); | ||
this.fetchPrefix = (_f = options.fetchPrefix) !== null && _f !== void 0 ? _f : (() => { var _a; return (_a = this.options.defaultPrefix) !== null && _a !== void 0 ? _a : null; }); | ||
for (const plugin of SapphireClient.plugins.values("preInitialization" /* PreInitialization */)) { | ||
@@ -90,10 +93,10 @@ plugin.hook.call(this, options); | ||
} | ||
this.id = (_f = options.id) !== null && _f !== void 0 ? _f : null; | ||
this.id = (_g = options.id) !== null && _g !== void 0 ? _g : null; | ||
this.stores | ||
.register(new ArgumentStore_1.ArgumentStore().registerPath(path_1.join(__dirname, '..', 'arguments'))) // | ||
.register(new CommandStore_1.CommandStore()) | ||
.register(new EventStore_1.EventStore().registerPath(path_1.join(__dirname, '..', 'events'))) | ||
.register(new ListenerStore_1.ListenerStore().registerPath(path_1.join(__dirname, '..', 'listeners'))) | ||
.register(new PreconditionStore_1.PreconditionStore().registerPath(path_1.join(__dirname, '..', 'preconditions'))); | ||
if (options.loadDefaultErrorEvents !== false) | ||
this.stores.get('events').registerPath(path_1.join(__dirname, '..', 'errorEvents')); | ||
if (options.loadDefaultErrorListeners !== false) | ||
this.stores.get('listeners').registerPath(path_1.join(__dirname, '..', 'errorListeners')); | ||
for (const plugin of SapphireClient.plugins.values("postInitialization" /* PostInitialization */)) { | ||
@@ -100,0 +103,0 @@ plugin.hook.call(this, options); |
@@ -8,3 +8,3 @@ "use strict"; | ||
* The base argument class. This class is abstract and is to be extended by subclasses implementing the methods. In | ||
* Sapphire's workflow, arguments are called when using [[Args]]'s methods (usually used inside [[Command]]s by default). | ||
* Sapphire's workflow, arguments are called when using {@link Args}'s methods (usually used inside {@link Command}s by default). | ||
* | ||
@@ -14,3 +14,3 @@ * @example | ||
* // TypeScript: | ||
* import { Argument, ArgumentResult, PieceContext } from '(at)sapphire/framework'; | ||
* import { Argument, ArgumentResult, PieceContext } from '@sapphire/framework'; | ||
* import { URL } from 'url'; | ||
@@ -36,3 +36,3 @@ * | ||
* // and others have a return type of `URL`. | ||
* declare module 'sapphire/framework/dist/lib/utils/Args' { | ||
* declare module '@sapphire/framework/dist/lib/utils/Args' { | ||
* export interface ArgType { | ||
@@ -47,3 +47,3 @@ * url: URL; | ||
* // JavaScript: | ||
* const { Argument } = require('(at)sapphire/framework'); | ||
* const { Argument } = require('@sapphire/framework'); | ||
* | ||
@@ -75,3 +75,3 @@ * // Define a class extending `Argument`, then export it. | ||
/** | ||
* Constructs an [[ArgumentError]] with a custom type. | ||
* Constructs an {@link ArgumentError} with a custom type. | ||
* @param parameter The parameter that triggered the argument. | ||
@@ -78,0 +78,0 @@ * @param type The identifier for the error. |
@@ -7,4 +7,6 @@ "use strict"; | ||
const utilities_1 = require("@sapphire/utilities"); | ||
const discord_js_1 = require("discord.js"); | ||
const Lexure = tslib_1.__importStar(require("lexure")); | ||
const Args_1 = require("../parsers/Args"); | ||
require("../types/Enums"); | ||
const PreconditionContainerArray_1 = require("../utils/preconditions/PreconditionContainerArray"); | ||
@@ -18,5 +20,5 @@ const FlagUnorderedStrategy_1 = require("../utils/strategies/FlagUnorderedStrategy"); | ||
*/ | ||
constructor(context, { name, ...options } = {}) { | ||
var _a, _b, _c; | ||
super(context, { ...options, name: (name !== null && name !== void 0 ? name : context.name).toLowerCase() }); | ||
constructor(context, options = {}) { | ||
var _a, _b, _c, _d; | ||
super(context, { ...options, name: ((_a = options.name) !== null && _a !== void 0 ? _a : context.name).toLowerCase() }); | ||
/** | ||
@@ -28,6 +30,6 @@ * The lexer to be used for command parsing | ||
this.lexer = new Lexure.Lexer(); | ||
this.description = (_a = options.description) !== null && _a !== void 0 ? _a : ''; | ||
this.detailedDescription = (_b = options.detailedDescription) !== null && _b !== void 0 ? _b : ''; | ||
this.strategy = new FlagUnorderedStrategy_1.FlagUnorderedStrategy(options.strategyOptions); | ||
this.lexer.setQuotes((_c = options.quotes) !== null && _c !== void 0 ? _c : [ | ||
this.description = (_b = options.description) !== null && _b !== void 0 ? _b : ''; | ||
this.detailedDescription = (_c = options.detailedDescription) !== null && _c !== void 0 ? _c : ''; | ||
this.strategy = new FlagUnorderedStrategy_1.FlagUnorderedStrategy(options); | ||
this.lexer.setQuotes((_d = options.quotes) !== null && _d !== void 0 ? _d : [ | ||
['"', '"'], | ||
@@ -46,3 +48,4 @@ ['β', 'β'], | ||
} | ||
this.preconditions = new PreconditionContainerArray_1.PreconditionContainerArray(this.resolveConstructorPreConditions(options)); | ||
this.preconditions = new PreconditionContainerArray_1.PreconditionContainerArray(); | ||
this.parseConstructorPreConditions(options); | ||
} | ||
@@ -71,16 +74,62 @@ /** | ||
} | ||
resolveConstructorPreConditions(options) { | ||
var _a, _b, _c; | ||
const preconditions = (_b = (_a = options.preconditions) === null || _a === void 0 ? void 0 : _a.slice()) !== null && _b !== void 0 ? _b : []; | ||
/** | ||
* Parses the command's options and processes them, calling {@link Command#parseConstructorPreConditionsRunIn}, | ||
* {@link Command#parseConstructorPreConditionsNsfw}, | ||
* {@link Command#parseConstructorPreConditionsRequiredClientPermissions}, and | ||
* {@link Command#parseConstructorPreConditionsCooldown}. | ||
* @since 2.0.0 | ||
* @param options The command options given from the constructor. | ||
*/ | ||
parseConstructorPreConditions(options) { | ||
this.parseConstructorPreConditionsRunIn(options); | ||
this.parseConstructorPreConditionsNsfw(options); | ||
this.parseConstructorPreConditionsRequiredClientPermissions(options); | ||
this.parseConstructorPreConditionsCooldown(options); | ||
} | ||
/** | ||
* Appends the `NSFW` precondition if {@link CommandOptions.nsfw} is set to true. | ||
* @param options The command options given from the constructor. | ||
*/ | ||
parseConstructorPreConditionsNsfw(options) { | ||
if (options.nsfw) | ||
preconditions.push("NSFW" /* NotSafeForWork */); | ||
this.preconditions.append("NSFW" /* NotSafeForWork */); | ||
} | ||
/** | ||
* Appends the `DMOnly`, `GuildOnly`, `NewsOnly`, and `TextOnly` preconditions based on the values passed in | ||
* {@link CommandOptions.runIn}, optimizing in specific cases (`NewsOnly` + `TextOnly` = `GuildOnly`; `DMOnly` + | ||
* `GuildOnly` = `null`), defaulting to `null`, which doesn't add a precondition. | ||
* @param options The command options given from the constructor. | ||
*/ | ||
parseConstructorPreConditionsRunIn(options) { | ||
const runIn = this.resolveConstructorPreConditionsRunType(options.runIn); | ||
if (runIn !== null) | ||
preconditions.push(runIn); | ||
const cooldownBucket = (_c = options.cooldownBucket) !== null && _c !== void 0 ? _c : 1; | ||
if (cooldownBucket && options.cooldownDuration) { | ||
preconditions.push({ name: "Cooldown" /* Cooldown */, context: { bucket: cooldownBucket, cooldown: options.cooldownDuration } }); | ||
this.preconditions.append(runIn); | ||
} | ||
/** | ||
* Appends the `Permissions` precondition when {@link CommandOptions.requiredClientPermissions} resolves to a | ||
* non-zero bitfield. | ||
* @param options The command options given from the constructor. | ||
*/ | ||
parseConstructorPreConditionsRequiredClientPermissions(options) { | ||
const permissions = new discord_js_1.Permissions(options.requiredClientPermissions); | ||
if (permissions.bitfield !== 0) { | ||
this.preconditions.append({ name: "Permissions" /* Permissions */, context: { permissions } }); | ||
} | ||
return preconditions; | ||
} | ||
/** | ||
* Appends the `Cooldown` precondition when {@link CommandOptions.cooldownLimit} and | ||
* {@link CommandOptions.cooldownDelay} are both non-zero. | ||
* @param options The command options given from the constructor. | ||
*/ | ||
parseConstructorPreConditionsCooldown(options) { | ||
var _a, _b, _c; | ||
const limit = (_a = options.cooldownLimit) !== null && _a !== void 0 ? _a : 1; | ||
const delay = (_b = options.cooldownDelay) !== null && _b !== void 0 ? _b : 0; | ||
if (limit && delay) { | ||
this.preconditions.append({ | ||
name: "Cooldown" /* Cooldown */, | ||
context: { scope: (_c = options.cooldownScope) !== null && _c !== void 0 ? _c : 3 /* User */, limit, delay } | ||
}); | ||
} | ||
} | ||
resolveConstructorPreConditionsRunType(runIn) { | ||
@@ -92,9 +141,9 @@ if (utilities_1.isNullish(runIn)) | ||
case 'dm': | ||
return ["DMOnly" /* DirectMessageOnly */]; | ||
return "DMOnly" /* DirectMessageOnly */; | ||
case 'text': | ||
return ["TextOnly" /* TextOnly */]; | ||
return "TextOnly" /* TextOnly */; | ||
case 'news': | ||
return ["NewsOnly" /* NewsOnly */]; | ||
return "NewsOnly" /* NewsOnly */; | ||
case 'guild': | ||
return ["GuildOnly" /* GuildOnly */]; | ||
return "GuildOnly" /* GuildOnly */; | ||
default: | ||
@@ -115,12 +164,12 @@ return null; | ||
return null; | ||
const array = []; | ||
const preconditions = new PreconditionContainerArray_1.PreconditionContainerArray(); | ||
if (dm) | ||
array.push("DMOnly" /* DirectMessageOnly */); | ||
preconditions.append("DMOnly" /* DirectMessageOnly */); | ||
if (guild) | ||
array.push("GuildOnly" /* GuildOnly */); | ||
preconditions.append("GuildOnly" /* GuildOnly */); | ||
else if (text) | ||
array.push("TextOnly" /* TextOnly */); | ||
preconditions.append("TextOnly" /* TextOnly */); | ||
else if (news) | ||
array.push("NewsOnly" /* NewsOnly */); | ||
return array; | ||
preconditions.append("NewsOnly" /* NewsOnly */); | ||
return preconditions; | ||
} | ||
@@ -136,8 +185,9 @@ } | ||
CommandPreConditions["Cooldown"] = "Cooldown"; | ||
CommandPreConditions["DirectMessageOnly"] = "DMOnly"; | ||
CommandPreConditions["GuildOnly"] = "GuildOnly"; | ||
CommandPreConditions["NewsOnly"] = "NewsOnly"; | ||
CommandPreConditions["NotSafeForWork"] = "NSFW"; | ||
CommandPreConditions["DirectMessageOnly"] = "DMOnly"; | ||
CommandPreConditions["Permissions"] = "Permissions"; | ||
CommandPreConditions["TextOnly"] = "TextOnly"; | ||
CommandPreConditions["NewsOnly"] = "NewsOnly"; | ||
CommandPreConditions["GuildOnly"] = "GuildOnly"; | ||
})(CommandPreConditions = exports.CommandPreConditions || (exports.CommandPreConditions = {})); | ||
//# sourceMappingURL=Command.js.map |
@@ -8,4 +8,4 @@ "use strict"; | ||
* The extended argument class. This class is abstract and is to be extended by subclasses which | ||
* will implement the [[ExtendedArgument#handle]] method. | ||
* Much like the [[Argument]] class, this class handles parsing user-specified command arguments | ||
* will implement the {@link ExtendedArgument#handle} method. | ||
* Much like the {@link Argument} class, this class handles parsing user-specified command arguments | ||
* into typed command parameters. However, this class can be used to expand upon an existing | ||
@@ -18,7 +18,7 @@ * argument in order to process its transformed value rather than just the argument string. | ||
* import { ApplyOptions } from '@sapphire/decorators'; | ||
* import { ArgumentResult, ExtendedArgument, ExtendedArgumentContext, ExtendedArgumentOptions } from '(at)sapphire/framework'; | ||
* import { ArgumentResult, ExtendedArgument, ExtendedArgumentContext, ExtendedArgumentOptions } from '@sapphire/framework'; | ||
* import type { Channel, TextChannel } from 'discord.js'; | ||
* | ||
* // Just like with `Argument`, you can use `export default` or `export =` too. | ||
* @ApplyOptions<ExtendedArgumentOptions>({ | ||
* (at)ApplyOptions<ExtendedArgumentOptions>({ | ||
* name: 'textChannel', | ||
@@ -31,3 +31,3 @@ * baseArgument: 'channel' | ||
* ? this.ok(parsed as TextChannel) | ||
* : this.error(argument, 'ArgumentTextChannelInvalidTextChannel', 'The argument did not resolve to a text channel.'); | ||
* : this.error({ identifier: 'ArgumentTextChannelInvalidTextChannel', message: 'The argument did not resolve to a text channel.' }); | ||
* } | ||
@@ -40,3 +40,3 @@ * } | ||
* // JavaScript: | ||
* const { ExtendedArgument } = require('(at)sapphire/framework'); | ||
* const { ExtendedArgument } = require('@sapphire/framework'); | ||
* | ||
@@ -51,3 +51,3 @@ * module.exports = class TextChannelArgument extends ExtendedArgument { | ||
* ? this.ok(parsed) | ||
* : this.error(argument, 'ArgumentTextChannelInvalidTextChannel', 'The argument did not resolve to a text channel/'); | ||
* : this.error({ identifier: 'ArgumentTextChannelInvalidTextChannel', message: 'The argument did not resolve to a text channel' }); | ||
* } | ||
@@ -54,0 +54,0 @@ * } |
@@ -17,3 +17,3 @@ "use strict"; | ||
/** | ||
* Constructs a [[PreconditionError]] with the precondition parameter set to `this`. | ||
* Constructs a {@link PreconditionError} with the precondition parameter set to `this`. | ||
* @param options The information. | ||
@@ -20,0 +20,0 @@ */ |
@@ -9,3 +9,3 @@ "use strict"; | ||
/** | ||
* A strict-typed store registry. This is available in both [[Client.stores]] and [[Store.injectedContext]]. | ||
* A strict-typed store registry. This is available in both {@link Client.stores} and {@link Store.injectedContext}. | ||
* @since 1.0.0 | ||
@@ -22,3 +22,3 @@ * @example | ||
* // file somewhere: | ||
* declare module '(at)sapphire/framework' { | ||
* declare module '@sapphire/framework' { | ||
* export interface StoreRegistryEntries { | ||
@@ -41,3 +41,3 @@ * routes: RouteStore; | ||
* β ββ commands | ||
* β ββ events | ||
* β ββ listeners | ||
* β ββ main.js | ||
@@ -47,5 +47,5 @@ * ββ package.json | ||
* | ||
* And you run `node src/main.js`, the directories `/home/me/my-bot/src/commands` and `/home/me/my-bot/src/events` will | ||
* be registered for the commands and events stores respectively, since both directories are located in the same | ||
* directory as your main file. | ||
* And you run `node src/main.js`, the directories `/home/me/my-bot/src/commands` and `/home/me/my-bot/src/listeners` | ||
* will be registered for the commands and listeners stores respectively, since both directories are located in the | ||
* same directory as your main file. | ||
* | ||
@@ -52,0 +52,0 @@ * **Note**: this also registers directories for all other stores, even if they don't have a folder, this allows you |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BucketType = exports.PluginHook = exports.CooldownLevel = void 0; | ||
exports.BucketScope = exports.PluginHook = exports.CooldownLevel = void 0; | ||
var CooldownLevel; | ||
@@ -19,23 +19,23 @@ (function (CooldownLevel) { | ||
/** | ||
* The level the cooldown applies to | ||
* The scope the cooldown applies to. | ||
*/ | ||
var BucketType; | ||
(function (BucketType) { | ||
var BucketScope; | ||
(function (BucketScope) { | ||
/** | ||
* Per channel cooldowns | ||
* Per channel cooldowns. | ||
*/ | ||
BucketType[BucketType["Channel"] = 0] = "Channel"; | ||
BucketScope[BucketScope["Channel"] = 0] = "Channel"; | ||
/** | ||
* Global cooldowns | ||
* Global cooldowns. | ||
*/ | ||
BucketType[BucketType["Global"] = 1] = "Global"; | ||
BucketScope[BucketScope["Global"] = 1] = "Global"; | ||
/** | ||
* Per guild cooldowns | ||
* Per guild cooldowns. | ||
*/ | ||
BucketType[BucketType["Guild"] = 2] = "Guild"; | ||
BucketScope[BucketScope["Guild"] = 2] = "Guild"; | ||
/** | ||
* Per user cooldowns | ||
* Per user cooldowns. | ||
*/ | ||
BucketType[BucketType["User"] = 3] = "User"; | ||
})(BucketType = exports.BucketType || (exports.BucketType = {})); | ||
BucketScope[BucketScope["User"] = 3] = "User"; | ||
})(BucketScope = exports.BucketScope || (exports.BucketScope = {})); | ||
//# sourceMappingURL=Enums.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Events = void 0; | ||
var Events; | ||
(function (Events) { | ||
const discord_js_1 = require("discord.js"); | ||
exports.Events = { | ||
// #region Discord.js base events | ||
Events["ChannelCreate"] = "channelCreate"; | ||
Events["ChannelDelete"] = "channelDelete"; | ||
Events["ChannelPinsUpdate"] = "channelPinsUpdate"; | ||
Events["ChannelUpdate"] = "channelUpdate"; | ||
Events["Debug"] = "debug"; | ||
Events["Warn"] = "warn"; | ||
Events["Disconnect"] = "disconnect"; | ||
Events["EmojiCreate"] = "emojiCreate"; | ||
Events["EmojiDelete"] = "emojiDelete"; | ||
Events["EmojiUpdate"] = "emojiUpdate"; | ||
Events["Error"] = "error"; | ||
Events["GuildBanAdd"] = "guildBanAdd"; | ||
Events["GuildBanRemove"] = "guildBanRemove"; | ||
Events["GuildCreate"] = "guildCreate"; | ||
Events["GuildDelete"] = "guildDelete"; | ||
Events["GuildUnavailable"] = "guildUnavailable"; | ||
Events["GuildIntegrationsUpdate"] = "guildIntegrationsUpdate"; | ||
Events["GuildMemberAdd"] = "guildMemberAdd"; | ||
Events["GuildMemberAvailable"] = "guildMemberAvailable"; | ||
Events["GuildMemberRemove"] = "guildMemberRemove"; | ||
Events["GuildMembersChunk"] = "guildMembersChunk"; | ||
Events["GuildMemberSpeaking"] = "guildMemberSpeaking"; | ||
Events["GuildMemberUpdate"] = "guildMemberUpdate"; | ||
Events["GuildUpdate"] = "guildUpdate"; | ||
Events["InviteCreate"] = "inviteCreate"; | ||
Events["InviteDelete"] = "inviteDelete"; | ||
Events["Message"] = "message"; | ||
Events["MessageDelete"] = "messageDelete"; | ||
Events["MessageReactionRemoveAll"] = "messageReactionRemoveAll"; | ||
Events["MessageReactionRemoveEmoji"] = "messageReactionRemoveEmoji"; | ||
Events["MessageDeleteBulk"] = "messageDeleteBulk"; | ||
Events["MessageReactionAdd"] = "messageReactionAdd"; | ||
Events["MessageReactionRemove"] = "messageReactionRemove"; | ||
Events["MessageUpdate"] = "messageUpdate"; | ||
Events["PresenceUpdate"] = "presenceUpdate"; | ||
Events["RateLimit"] = "rateLimit"; | ||
Events["Ready"] = "ready"; | ||
Events["Invalidated"] = "invalidated"; | ||
Events["RoleCreate"] = "roleCreate"; | ||
Events["RoleDelete"] = "roleDelete"; | ||
Events["RoleUpdate"] = "roleUpdate"; | ||
Events["TypingsStart"] = "typingStart"; | ||
Events["UserUpdate"] = "userUpdate"; | ||
Events["VoiceStateUpdate"] = "voiceStateUpdate"; | ||
Events["WebhookUpdate"] = "webhookUpdate"; | ||
Events["ShardDisconnect"] = "shardDisconnect"; | ||
Events["ShardError"] = "shardError"; | ||
Events["ShardReady"] = "shardReady"; | ||
Events["ShardReconnecting"] = "shardReconnecting"; | ||
Events["ShardResume"] = "shardResume"; | ||
ChannelCreate: discord_js_1.Constants.Events.CHANNEL_CREATE, | ||
ChannelDelete: discord_js_1.Constants.Events.CHANNEL_DELETE, | ||
ChannelPinsUpdate: discord_js_1.Constants.Events.CHANNEL_PINS_UPDATE, | ||
ChannelUpdate: discord_js_1.Constants.Events.CHANNEL_UPDATE, | ||
ClientReady: discord_js_1.Constants.Events.CLIENT_READY, | ||
Debug: discord_js_1.Constants.Events.DEBUG, | ||
Disconnect: discord_js_1.Constants.Events.DISCONNECT, | ||
Error: discord_js_1.Constants.Events.ERROR, | ||
GuildBanAdd: discord_js_1.Constants.Events.GUILD_BAN_ADD, | ||
GuildBanRemove: discord_js_1.Constants.Events.GUILD_BAN_REMOVE, | ||
GuildCreate: discord_js_1.Constants.Events.GUILD_CREATE, | ||
GuildDelete: discord_js_1.Constants.Events.GUILD_DELETE, | ||
GuildEmojiCreate: discord_js_1.Constants.Events.GUILD_EMOJI_CREATE, | ||
GuildEmojiDelete: discord_js_1.Constants.Events.GUILD_EMOJI_DELETE, | ||
GuildEmojiUpdate: discord_js_1.Constants.Events.GUILD_EMOJI_UPDATE, | ||
GuildIntegrationsUpdate: discord_js_1.Constants.Events.GUILD_INTEGRATIONS_UPDATE, | ||
GuildMemberAdd: discord_js_1.Constants.Events.GUILD_MEMBER_ADD, | ||
GuildMemberAvailable: discord_js_1.Constants.Events.GUILD_MEMBER_AVAILABLE, | ||
GuildMemberRemove: discord_js_1.Constants.Events.GUILD_MEMBER_REMOVE, | ||
GuildMemberSpeaking: discord_js_1.Constants.Events.GUILD_MEMBER_SPEAKING, | ||
GuildMemberUpdate: discord_js_1.Constants.Events.GUILD_MEMBER_UPDATE, | ||
GuildMembersChunk: discord_js_1.Constants.Events.GUILD_MEMBERS_CHUNK, | ||
GuildRoleCreate: discord_js_1.Constants.Events.GUILD_ROLE_CREATE, | ||
GuildRoleDelete: discord_js_1.Constants.Events.GUILD_ROLE_DELETE, | ||
GuildRoleUpdate: discord_js_1.Constants.Events.GUILD_ROLE_UPDATE, | ||
GuildUnavailable: discord_js_1.Constants.Events.GUILD_UNAVAILABLE, | ||
GuildUpdate: discord_js_1.Constants.Events.GUILD_UPDATE, | ||
Invalidated: discord_js_1.Constants.Events.INVALIDATED, | ||
InviteCreate: discord_js_1.Constants.Events.INVITE_CREATE, | ||
InviteDelete: discord_js_1.Constants.Events.INVITE_DELETE, | ||
MessageBulkDelete: discord_js_1.Constants.Events.MESSAGE_BULK_DELETE, | ||
MessageCreate: discord_js_1.Constants.Events.MESSAGE_CREATE, | ||
MessageDelete: discord_js_1.Constants.Events.MESSAGE_DELETE, | ||
MessageReactionAdd: discord_js_1.Constants.Events.MESSAGE_REACTION_ADD, | ||
MessageReactionRemoveAll: discord_js_1.Constants.Events.MESSAGE_REACTION_REMOVE_ALL, | ||
MessageReactionRemove: discord_js_1.Constants.Events.MESSAGE_REACTION_REMOVE, | ||
MessageUpdate: discord_js_1.Constants.Events.MESSAGE_UPDATE, | ||
PresenceUpdate: discord_js_1.Constants.Events.PRESENCE_UPDATE, | ||
RateLimit: discord_js_1.Constants.Events.RATE_LIMIT, | ||
Raw: discord_js_1.Constants.Events.RAW, | ||
Reconnecting: discord_js_1.Constants.Events.RECONNECTING, | ||
Resumed: discord_js_1.Constants.Events.RESUMED, | ||
ShardDisconnect: discord_js_1.Constants.Events.SHARD_DISCONNECT, | ||
ShardError: discord_js_1.Constants.Events.SHARD_ERROR, | ||
ShardReady: discord_js_1.Constants.Events.SHARD_READY, | ||
ShardReconnecting: discord_js_1.Constants.Events.SHARD_RECONNECTING, | ||
ShardResume: discord_js_1.Constants.Events.SHARD_RESUME, | ||
TypingStart: discord_js_1.Constants.Events.TYPING_START, | ||
UserUpdate: discord_js_1.Constants.Events.USER_UPDATE, | ||
VoiceStateUpdate: discord_js_1.Constants.Events.VOICE_STATE_UPDATE, | ||
Warn: discord_js_1.Constants.Events.WARN, | ||
WebhooksUpdate: discord_js_1.Constants.Events.WEBHOOKS_UPDATE, | ||
// #endregion Discord.js base events | ||
// #region Sapphire load cycle events | ||
Events["PieceUnload"] = "pieceUnload"; | ||
Events["PiecePostLoad"] = "piecePostLoad"; | ||
Events["MentionPrefixOnly"] = "mentionPrefixOnly"; | ||
Events["EventError"] = "eventError"; | ||
Events["PreMessageParsed"] = "preMessageParsed"; | ||
Events["PrefixedMessage"] = "prefixedMessage"; | ||
Events["UnknownCommandName"] = "unknownCommandName"; | ||
Events["UnknownCommand"] = "unknownCommand"; | ||
Events["PreCommandRun"] = "preCommandRun"; | ||
Events["CommandDenied"] = "commandDenied"; | ||
Events["CommandAccepted"] = "commandAccepted"; | ||
Events["CommandRun"] = "commandRun"; | ||
Events["CommandSuccess"] = "commandSuccess"; | ||
Events["CommandFinish"] = "commandFinish"; | ||
Events["CommandError"] = "commandError"; | ||
Events["PluginLoaded"] = "pluginLoaded"; | ||
Events["NonPrefixedMessage"] = "nonPrefixedMessage"; | ||
CommandAccepted: 'commandAccepted', | ||
CommandDenied: 'commandDenied', | ||
CommandError: 'commandError', | ||
CommandFinish: 'commandFinish', | ||
CommandRun: 'commandRun', | ||
CommandSuccess: 'commandSuccess', | ||
ListenerError: 'listenerError', | ||
MentionPrefixOnly: 'mentionPrefixOnly', | ||
NonPrefixedMessage: 'nonPrefixedMessage', | ||
PiecePostLoad: 'piecePostLoad', | ||
PieceUnload: 'pieceUnload', | ||
PluginLoaded: 'pluginLoaded', | ||
PreCommandRun: 'preCommandRun', | ||
PrefixedMessage: 'prefixedMessage', | ||
PreMessageParsed: 'preMessageParsed', | ||
UnknownCommand: 'unknownCommand', | ||
UnknownCommandName: 'unknownCommandName' | ||
// #endregion Sapphire load cycle events | ||
})(Events = exports.Events || (exports.Events = {})); | ||
}; | ||
//# sourceMappingURL=Events.js.map |
@@ -5,3 +5,3 @@ "use strict"; | ||
/** | ||
* The logger levels for the [[ILogger]]. | ||
* The logger levels for the {@link ILogger}. | ||
*/ | ||
@@ -11,23 +11,23 @@ var LogLevel; | ||
/** | ||
* The lowest log level, used when calling [[ILogger.trace]]. | ||
* The lowest log level, used when calling {@link ILogger.trace}. | ||
*/ | ||
LogLevel[LogLevel["Trace"] = 10] = "Trace"; | ||
/** | ||
* The debug level, used when calling [[ILogger.debug]]. | ||
* The debug level, used when calling {@link ILogger.debug}. | ||
*/ | ||
LogLevel[LogLevel["Debug"] = 20] = "Debug"; | ||
/** | ||
* The info level, used when calling [[ILogger.info]]. | ||
* The info level, used when calling {@link ILogger.info}. | ||
*/ | ||
LogLevel[LogLevel["Info"] = 30] = "Info"; | ||
/** | ||
* The warning level, used when calling [[ILogger.warn]]. | ||
* The warning level, used when calling {@link ILogger.warn}. | ||
*/ | ||
LogLevel[LogLevel["Warn"] = 40] = "Warn"; | ||
/** | ||
* The error level, used when calling [[ILogger.error]]. | ||
* The error level, used when calling {@link ILogger.error}. | ||
*/ | ||
LogLevel[LogLevel["Error"] = 50] = "Error"; | ||
/** | ||
* The critical level, used when calling [[ILogger.fatal]]. | ||
* The critical level, used when calling {@link ILogger.fatal}. | ||
*/ | ||
@@ -34,0 +34,0 @@ LogLevel[LogLevel["Fatal"] = 60] = "Fatal"; |
@@ -9,2 +9,5 @@ "use strict"; | ||
} | ||
has(level) { | ||
return level >= this.level; | ||
} | ||
trace(...values) { | ||
@@ -29,3 +32,3 @@ this.write(10 /* Trace */, ...values); | ||
write(level, ...values) { | ||
if (level < this.level) | ||
if (!this.has(level)) | ||
return; | ||
@@ -32,0 +35,0 @@ const method = Logger.levels.get(level); |
@@ -6,3 +6,3 @@ "use strict"; | ||
/** | ||
* An [[IPreconditionCondition]] which runs all containers similarly to doing (V0 && V1 [&& V2 [&& V3 ...]]). | ||
* An {@link IPreconditionCondition} which runs all containers similarly to doing (V0 && V1 [&& V2 [&& V3 ...]]). | ||
* @since 1.0.0 | ||
@@ -9,0 +9,0 @@ */ |
@@ -6,3 +6,3 @@ "use strict"; | ||
/** | ||
* An [[IPreconditionCondition]] which runs all containers similarly to doing (V0 || V1 [|| V2 [|| V3 ...]]). | ||
* An {@link IPreconditionCondition} which runs all containers similarly to doing (V0 || V1 [|| V2 [|| V3 ...]]). | ||
* @since 1.0.0 | ||
@@ -9,0 +9,0 @@ */ |
@@ -9,3 +9,3 @@ "use strict"; | ||
/** | ||
* The run mode for a [[PreconditionContainerArray]]. | ||
* The run mode for a {@link PreconditionContainerArray}. | ||
* @since 1.0.0 | ||
@@ -29,3 +29,3 @@ */ | ||
/** | ||
* The condition for a [[PreconditionContainerArray]]. | ||
* The condition for a {@link PreconditionContainerArray}. | ||
*/ | ||
@@ -35,3 +35,3 @@ var PreconditionRunCondition; | ||
/** | ||
* Defines a condition where all the entries must pass. This uses [[PreconditionConditionAnd]]. | ||
* Defines a condition where all the entries must pass. This uses {@link PreconditionConditionAnd}. | ||
* @since 1.0.0 | ||
@@ -41,3 +41,3 @@ */ | ||
/** | ||
* Defines a condition where at least one entry must pass. This uses [[PreconditionConditionOr]]. | ||
* Defines a condition where at least one entry must pass. This uses {@link PreconditionConditionOr}. | ||
* @since 1.0.0 | ||
@@ -51,5 +51,5 @@ */ | ||
/** | ||
* An [[IPreconditionContainer]] that defines an array of multiple [[IPreconditionContainer]]s. | ||
* An {@link IPreconditionContainer} that defines an array of multiple {@link IPreconditionContainer}s. | ||
* | ||
* By default, array containers run either of two conditions: AND and OR ([[PreconditionRunCondition]]), the top level | ||
* By default, array containers run either of two conditions: AND and OR ({@link PreconditionRunCondition}), the top level | ||
* will always default to AND, where the nested one flips the logic (OR, then children arrays are AND, then OR...). | ||
@@ -66,4 +66,4 @@ * | ||
* ``` | ||
* @remark More advanced logic can be accomplished by adding more [[IPreconditionCondition]]s (e.g. other operators), | ||
* see [[PreconditionContainerArray.conditions]] for more information. | ||
* @remark More advanced logic can be accomplished by adding more {@link IPreconditionCondition}s (e.g. other operators), | ||
* see {@link PreconditionContainerArray.conditions} for more information. | ||
* @since 1.0.0 | ||
@@ -96,2 +96,6 @@ */ | ||
} | ||
append(entry) { | ||
this.entries.push(entry instanceof PreconditionContainerArray ? entry : new PreconditionContainerSingle_1.PreconditionContainerSingle(entry)); | ||
return this; | ||
} | ||
/** | ||
@@ -122,3 +126,3 @@ * Runs the container. | ||
/** | ||
* Retrieves a condition from [[PreconditionContainerArray.conditions]], assuming existence. | ||
* Retrieves a condition from {@link PreconditionContainerArray.conditions}, assuming existence. | ||
* @since 1.0.0 | ||
@@ -132,4 +136,4 @@ */ | ||
/** | ||
* The preconditions to be run. Extra ones can be added by augmenting [[PreconditionRunCondition]] and then | ||
* inserting [[IPreconditionCondition]]s. | ||
* The preconditions to be run. Extra ones can be added by augmenting {@link PreconditionRunCondition} and then | ||
* inserting {@link IPreconditionCondition}s. | ||
* @since 1.0.0 | ||
@@ -146,3 +150,3 @@ * @example | ||
* // file somewhere: | ||
* declare module '(at)sapphire/framework' { | ||
* declare module '@sapphire/framework' { | ||
* export enum PreconditionRunCondition { | ||
@@ -149,0 +153,0 @@ * Random = 2 |
@@ -6,3 +6,3 @@ "use strict"; | ||
/** | ||
* An [[IPreconditionContainer]] which runs a single precondition from [[SapphireClient.preconditions]]. | ||
* An {@link IPreconditionContainer} which runs a single precondition from {@link SapphireClient.preconditions}. | ||
* @since 1.0.0 | ||
@@ -12,2 +12,3 @@ */ | ||
constructor(data) { | ||
var _a; | ||
if (typeof data === 'string') { | ||
@@ -18,3 +19,3 @@ this.context = {}; | ||
else { | ||
this.context = data.context; | ||
this.context = (_a = Reflect.get(data, 'context')) !== null && _a !== void 0 ? _a : {}; | ||
this.name = data.name; | ||
@@ -21,0 +22,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FlagUnorderedStrategy = void 0; | ||
const never = () => null; | ||
const always = () => true; | ||
class FlagUnorderedStrategy { | ||
constructor({ flags = [], options = [], prefixes = ['--', '-', 'β'], separators = ['=', ':'] } = {}) { | ||
this.flags = flags; | ||
this.options = options; | ||
constructor({ flags, options, prefixes = ['--', '-', 'β'], separators = ['=', ':'] } = {}) { | ||
this.flags = flags || []; | ||
this.options = options || []; | ||
this.prefixes = prefixes; | ||
this.separators = separators; | ||
if (this.flags === true) | ||
this.allowedFlag = always; | ||
else if (this.flags.length === 0) | ||
this.matchFlag = never; | ||
if (this.options === true) { | ||
this.allowedOption = always; | ||
} | ||
else if (this.options.length === 0) { | ||
this.matchOption = never; | ||
this.matchCompactOption = never; | ||
} | ||
} | ||
@@ -20,3 +33,3 @@ matchFlag(s) { | ||
// The flag must be an allowed one. | ||
if (this.flags.includes(s)) | ||
if (this.allowedFlag(s)) | ||
return s; | ||
@@ -35,3 +48,3 @@ // If it did not match a flag, return null. | ||
s = s.slice(0, -separator.length); | ||
if (this.options.includes(s)) | ||
if (this.allowedOption(s)) | ||
return s; | ||
@@ -52,3 +65,3 @@ return null; | ||
const k = s.slice(0, i); | ||
if (!this.options.includes(k)) | ||
if (!this.allowedOption(k)) | ||
return null; | ||
@@ -58,4 +71,10 @@ const v = s.slice(i + sep.length); | ||
} | ||
allowedFlag(s) { | ||
return this.flags.includes(s); | ||
} | ||
allowedOption(s) { | ||
return this.options.includes(s); | ||
} | ||
} | ||
exports.FlagUnorderedStrategy = FlagUnorderedStrategy; | ||
//# sourceMappingURL=FlagUnorderedStrategy.js.map |
@@ -31,3 +31,3 @@ "use strict"; | ||
getID(message, context) { | ||
switch (context.bucketType) { | ||
switch (context.scope) { | ||
case 1 /* Global */: | ||
@@ -34,0 +34,0 @@ return 'global'; |
@@ -9,4 +9,4 @@ "use strict"; | ||
return message.channel.type === 'news' | ||
? this.error({ identifier: "preconditionNewsOnly" /* PreconditionNewsOnly */, message: 'You can only run this command in news channels.' }) | ||
: this.ok(); | ||
? this.ok() | ||
: this.error({ identifier: "preconditionNewsOnly" /* PreconditionNewsOnly */, message: 'You can only run this command in news channels.' }); | ||
} | ||
@@ -13,0 +13,0 @@ } |
@@ -25,5 +25,4 @@ "use strict"; | ||
const required = (_a = context.permissions) !== null && _a !== void 0 ? _a : new discord_js_1.Permissions(0); | ||
const permissions = message.guild | ||
? message.channel.permissionsFor(message.client.id) | ||
: this.dmChannelPermissions; | ||
const channel = message.channel; | ||
const permissions = message.guild ? channel.permissionsFor(message.client.id) : this.dmChannelPermissions; | ||
const missing = permissions.missing(required); | ||
@@ -30,0 +29,0 @@ return missing.length === 0 |
@@ -9,4 +9,4 @@ "use strict"; | ||
return message.channel.type === 'text' | ||
? this.error({ identifier: "preconditionTextOnly" /* PreconditionTextOnly */, message: 'You can only run this command in text channels.' }) | ||
: this.ok(); | ||
? this.ok() | ||
: this.error({ identifier: "preconditionTextOnly" /* PreconditionTextOnly */, message: 'You can only run this command in text channels.' }); | ||
} | ||
@@ -13,0 +13,0 @@ } |
{ | ||
"name": "@sapphire/framework", | ||
"version": "2.0.0-next.3b3fcba5.0", | ||
"version": "2.0.0-next.3ce4d716.0", | ||
"description": "Discord bot framework built on top of @sapphire/lib for advanced and amazing bots.", | ||
@@ -17,9 +17,4 @@ "main": "dist/index.js", | ||
"update": "yarn upgrade-interactive --latest", | ||
"build": "run-s build:tsc", | ||
"build:cleanup": "node scripts/clean-dist.mjs", | ||
"build:tsc": "tsc -b src", | ||
"build:rollup-bundle": "rollup -c scripts/rollup.bundle.ts", | ||
"build:rollup-types": "rollup -c scripts/rollup.types.ts", | ||
"build:clean-extraneous-types": "node scripts/clean-extraneous-types.mjs", | ||
"clean": "yarn build:cleanup", | ||
"clean": "node scripts/clean-dist.mjs", | ||
"build": "tsc -b src && rollup -c scripts/rollup.bundle.ts", | ||
"watch": "tsc -b src -w", | ||
@@ -29,13 +24,13 @@ "sversion": "standard-version", | ||
"cz": "git-cz", | ||
"prepublishOnly": "run-s build:**", | ||
"prepublishOnly": "rollup-type-bundler -e url events", | ||
"prepare": "husky install .github/husky" | ||
}, | ||
"dependencies": { | ||
"@sapphire/discord-utilities": "^2.1.3", | ||
"@sapphire/discord.js-utilities": "^1.5.9", | ||
"@sapphire/pieces": "^2.0.0", | ||
"@sapphire/ratelimits": "^1.2.3", | ||
"@sapphire/utilities": "^1.5.3", | ||
"@sapphire/discord-utilities": "^2.1.5", | ||
"@sapphire/discord.js-utilities": "^1.6.0", | ||
"@sapphire/pieces": "~2.0.0", | ||
"@sapphire/ratelimits": "^1.2.5", | ||
"@sapphire/utilities": "^1.6.1", | ||
"lexure": "^0.17.0", | ||
"tslib": "^2.2.0" | ||
"tslib": "^2.3.0" | ||
}, | ||
@@ -45,26 +40,24 @@ "devDependencies": { | ||
"@commitlint/config-conventional": "^12.1.4", | ||
"@mdx-js/mdx": "^1.6.22", | ||
"@sapphire/eslint-config": "^3.1.4", | ||
"@sapphire/prettier-config": "^1.1.3", | ||
"@sapphire/ts-config": "^2.2.3", | ||
"@favware/rollup-type-bundler": "^1.0.2", | ||
"@sapphire/eslint-config": "^3.2.1", | ||
"@sapphire/prettier-config": "^1.1.6", | ||
"@sapphire/ts-config": "^2.3.1", | ||
"@types/jest": "^26.0.23", | ||
"@types/node": "^15.12.1", | ||
"@types/ws": "^7.4.4", | ||
"@types/node": "^16.3.1", | ||
"@types/ws": "^7.4.6", | ||
"cz-conventional-changelog": "^3.3.0", | ||
"discord.js": "^12.5.3", | ||
"husky": "^6.0.0", | ||
"jest": "^27.0.4", | ||
"jest-circus": "^27.0.4", | ||
"husky": "^7.0.1", | ||
"jest": "^27.0.6", | ||
"jest-circus": "^27.0.6", | ||
"lint-staged": "^11.0.0", | ||
"npm-run-all": "^4.1.5", | ||
"pretty-quick": "^3.1.0", | ||
"rollup": "^2.51.0", | ||
"rollup-plugin-dts": "^3.0.2", | ||
"pretty-quick": "^3.1.1", | ||
"rollup": "^2.53.1", | ||
"rollup-plugin-version-injector": "^1.3.3", | ||
"standard-version": "^9.3.0", | ||
"ts-jest": "^27.0.2", | ||
"ts-jest": "^27.0.3", | ||
"ts-node": "^10.0.0", | ||
"typedoc": "^0.21.0-beta.1", | ||
"typedoc": "^0.21.3", | ||
"typedoc-plugin-nojekyll": "^1.0.1", | ||
"typescript": "^4.3.2" | ||
"typescript": "^4.3.5" | ||
}, | ||
@@ -113,3 +106,3 @@ "repository": { | ||
"resolutions": { | ||
"acorn": "^8.2.4", | ||
"acorn": "^8.4.1", | ||
"minimist": "^1.2.5", | ||
@@ -121,7 +114,8 @@ "kind-of": "^6.0.3", | ||
"lodash": "^4.17.21", | ||
"marked": "^2.0.3", | ||
"marked": "^2.1.3", | ||
"merge": "^2.1.1", | ||
"trim": "^1.0.1" | ||
"trim": "^1.0.1", | ||
"trim-newlines": "^3.0.1" | ||
}, | ||
"prettier": "@sapphire/prettier-config" | ||
} |
@@ -27,3 +27,3 @@ <div align="center"> | ||
- Written in TypeScript | ||
- Command Handler, Arguments, Pre-conditions and Events Store | ||
- Command Handler, Arguments, Pre-conditions and Listeners Store | ||
- Completely Modular and Extendable | ||
@@ -73,21 +73,22 @@ - Advanced Plugins Support | ||
<tr> | ||
<td align="center"><a href="https://github.com/kyranet"><img src="https://avatars0.githubusercontent.com/u/24852502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Antonio RomΓ‘n</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=kyranet" title="Code">π»</a> <a href="https://github.com/sapphi/sapphiredev/its?author=kyranet" title="Documentation">π</a> <a href="#design-kyranet" title="Design">π¨</a> <a href="#ideas-kyranet" title="Ideas, Planning, & Feedback">π€</a> <a href="#infra-kyranet" title="Infrastructure (Hosting, Build-Tools, etc)">π</a> <a href="#projectManagement-kyranet" title="Project Management">π</a> <a href="#plugin-kyranet" title="Plugin/utility libraries">π</a></td> | ||
<td align="center"><a href="https://favware.tech/"><img src="https://avatars3.githubusercontent.com/u/4019718?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jeroen Claassens</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=Favna" title="Code">π»</a> <a href="https://github.com/sapphi/sapphiredev/its?author=Favna" title="Documentation">π</a> <a href="#infra-Favna" title="Infrastructure (Hosting, Build-Tools, etc)">π</a> <a href="#projectManagement-Favna" title="Project Management">π</a> <a href="#plugin-Favna" title="Plugin/utility libraries">π</a></td> | ||
<td align="center"><a href="https://github.com/cfanoulis"><img src="https://avatars3.githubusercontent.com/u/38255093?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Charalampos Fanoulis</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=cfanoulis" title="Code">π»</a></td> | ||
<td align="center"><a href="http://www.adityatd.me"><img src="https://avatars0.githubusercontent.com/u/9266227?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aditya N. Tripathi</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=AdityaTD" title="Code">π»</a> <a href="https://github.com/sapphi/sapphiredev/its?author=AdityaTD" title="Documentation">π</a></td> | ||
<td align="center"><a href="http://leonard.pw"><img src="https://avatars1.githubusercontent.com/u/35312043?v=4?s=100" width="100px;" alt=""/><br /><sub><b>LeonardSSH</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=LeonardSSH" title="Documentation">π</a></td> | ||
<td align="center"><a href="https://quantumlytangled.com/"><img src="https://avatars1.githubusercontent.com/u/7919610?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nejc DrobniΔ</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=QuantumlyTangled" title="Code">π»</a> <a href="#plugin-QuantumlyTangled" title="Plugin/utility libraries">π</a></td> | ||
<td align="center"><a href="https://github.com/Phamzito"><img src="https://avatars2.githubusercontent.com/u/31642521?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David Gustavo Herrera De La Cruz</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=Phamzito" title="Code">π»</a></td> | ||
<td align="center"><a href="https://github.com/kyranet"><img src="https://avatars0.githubusercontent.com/u/24852502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Antonio RomΓ‘n</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=kyranet" title="Code">π»</a> <a href="https://github.com/sapphiredev/framework/commits?author=kyranet" title="Documentation">π</a> <a href="#design-kyranet" title="Design">π¨</a> <a href="#ideas-kyranet" title="Ideas, Planning, & Feedback">π€</a> <a href="#infra-kyranet" title="Infrastructure (Hosting, Build-Tools, etc)">π</a> <a href="#projectManagement-kyranet" title="Project Management">π</a> <a href="#plugin-kyranet" title="Plugin/utility libraries">π</a></td> | ||
<td align="center"><a href="https://favware.tech/"><img src="https://avatars3.githubusercontent.com/u/4019718?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jeroen Claassens</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=Favna" title="Code">π»</a> <a href="https://github.com/sapphiredev/framework/commits?author=Favna" title="Documentation">π</a> <a href="#infra-Favna" title="Infrastructure (Hosting, Build-Tools, etc)">π</a> <a href="#projectManagement-Favna" title="Project Management">π</a> <a href="#plugin-Favna" title="Plugin/utility libraries">π</a></td> | ||
<td align="center"><a href="https://github.com/cfanoulis"><img src="https://avatars3.githubusercontent.com/u/38255093?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Charalampos Fanoulis</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=cfanoulis" title="Code">π»</a></td> | ||
<td align="center"><a href="http://www.adityatd.me"><img src="https://avatars0.githubusercontent.com/u/9266227?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aditya N. Tripathi</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=AdityaTD" title="Code">π»</a> <a href="https://github.com/sapphiredev/framework/commits?author=AdityaTD" title="Documentation">π</a></td> | ||
<td align="center"><a href="http://leonard.pw"><img src="https://avatars1.githubusercontent.com/u/35312043?v=4?s=100" width="100px;" alt=""/><br /><sub><b>LeonardSSH</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=LeonardSSH" title="Documentation">π</a></td> | ||
<td align="center"><a href="https://quantumlytangled.com/"><img src="https://avatars1.githubusercontent.com/u/7919610?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nejc DrobniΔ</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=QuantumlyTangled" title="Code">π»</a> <a href="#plugin-QuantumlyTangled" title="Plugin/utility libraries">π</a></td> | ||
<td align="center"><a href="https://github.com/Phamzito"><img src="https://avatars2.githubusercontent.com/u/31642521?v=4?s=100" width="100px;" alt=""/><br /><sub><b>David Gustavo Herrera De La Cruz</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=Phamzito" title="Code">π»</a></td> | ||
</tr> | ||
<tr> | ||
<td align="center"><a href="https://github.com/Rexogamer"><img src="https://avatars0.githubusercontent.com/u/42586271?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ed L</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=Rexogamer" title="Documentation">π</a></td> | ||
<td align="center"><a href="https://atm.moe/"><img src="https://avatars3.githubusercontent.com/u/31011461?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kovacs Alex</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=alexthemaster" title="Code">π»</a></td> | ||
<td align="center"><a href="https://github.com/Alcremie"><img src="https://avatars0.githubusercontent.com/u/54785334?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ivan Lieder</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=Alcremie" title="Code">π»</a> <a href="https://github.com/sapphi/sapphiredev/s?q=is%3Apr+reviewed-by%3AAlcremie" title="Reviewed Pull Requests">π</a></td> | ||
<td align="center"><a href="https://github.com/Nytelife26"><img src="https://avatars1.githubusercontent.com/u/22531310?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tyler J Russell</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=Nytelife26" title="Code">π»</a> <a href="#infra-Nytelife26" title="Infrastructure (Hosting, Build-Tools, etc)">π</a> <a href="#plugin-Nytelife26" title="Plugin/utility libraries">π</a></td> | ||
<td align="center"><a href="https://github.com/Soumil07"><img src="https://avatars0.githubusercontent.com/u/29275227?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Soumil07</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=Soumil07" title="Code">π»</a></td> | ||
<td align="center"><a href="https://lavya.tech/"><img src="https://avatars.githubusercontent.com/u/65386243?v=4?s=100" width="100px;" alt=""/><br /><sub><b>lavgup</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=lavgup" title="Documentation">π</a></td> | ||
<td align="center"><a href="https://github.com/vladfrangu"><img src="https://avatars.githubusercontent.com/u/17960496?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vlad Frangu</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=vladfrangu" title="Code">π»</a> <a href="#infra-vladfrangu" title="Infrastructure (Hosting, Build-Tools, etc)">π</a> <a href="https://github.com/sapphi/sapphiredev/s?q=is%3Apr+reviewed-by%3Avladfrangu" title="Reviewed Pull Requests">π</a></td> | ||
<td align="center"><a href="https://github.com/Rexogamer"><img src="https://avatars0.githubusercontent.com/u/42586271?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ed L</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=Rexogamer" title="Documentation">π</a></td> | ||
<td align="center"><a href="https://atm.moe/"><img src="https://avatars3.githubusercontent.com/u/31011461?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kovacs Alex</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=alexthemaster" title="Code">π»</a></td> | ||
<td align="center"><a href="https://github.com/Alcremie"><img src="https://avatars0.githubusercontent.com/u/54785334?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ivan Lieder</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=Alcremie" title="Code">π»</a> <a href="https://github.com/sapphiredev/framework/pulls?q=is%3Apr+reviewed-by%3AAlcremie" title="Reviewed Pull Requests">π</a></td> | ||
<td align="center"><a href="https://github.com/Nytelife26"><img src="https://avatars1.githubusercontent.com/u/22531310?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tyler J Russell</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=Nytelife26" title="Code">π»</a> <a href="#infra-Nytelife26" title="Infrastructure (Hosting, Build-Tools, etc)">π</a> <a href="#plugin-Nytelife26" title="Plugin/utility libraries">π</a></td> | ||
<td align="center"><a href="https://github.com/Soumil07"><img src="https://avatars0.githubusercontent.com/u/29275227?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Soumil07</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=Soumil07" title="Code">π»</a></td> | ||
<td align="center"><a href="https://lavya.tech/"><img src="https://avatars.githubusercontent.com/u/65386243?v=4?s=100" width="100px;" alt=""/><br /><sub><b>lavgup</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=lavgup" title="Documentation">π</a></td> | ||
<td align="center"><a href="https://github.com/vladfrangu"><img src="https://avatars.githubusercontent.com/u/17960496?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vlad Frangu</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=vladfrangu" title="Code">π»</a> <a href="#infra-vladfrangu" title="Infrastructure (Hosting, Build-Tools, etc)">π</a> <a href="https://github.com/sapphiredev/framework/pulls?q=is%3Apr+reviewed-by%3Avladfrangu" title="Reviewed Pull Requests">π</a></td> | ||
</tr> | ||
<tr> | ||
<td align="center"><a href="https://github.com/noftaly"><img src="https://avatars.githubusercontent.com/u/34779161?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Elliot</b></sub></a><br /><a href="https://github.com/sapphiredev/rk/commits?author=noftaly" title="Documentation">π</a></td> | ||
<td align="center"><a href="https://github.com/noftaly"><img src="https://avatars.githubusercontent.com/u/34779161?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Elliot</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=noftaly" title="Documentation">π</a></td> | ||
<td align="center"><a href="https://kaname.netlify.app"><img src="https://avatars.githubusercontent.com/u/56084970?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kaname</b></sub></a><br /><a href="https://github.com/sapphiredev/framework/commits?author=kaname-png" title="Code">π»</a> <a href="https://github.com/sapphiredev/framework/issues?q=author%3Akaname-png" title="Bug reports">π</a></td> | ||
</tr> | ||
@@ -94,0 +95,0 @@ </table> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
288512
24
5120
103
+ Added@discordjs/collection@0.1.6(transitive)
+ Added@sapphire/pieces@2.0.0(transitive)
- Removed@discordjs/collection@0.2.4(transitive)
- Removed@sapphire/pieces@2.2.0(transitive)
- Removed@sapphire/utilities@2.0.1(transitive)
Updated@sapphire/pieces@~2.0.0
Updated@sapphire/ratelimits@^1.2.5
Updated@sapphire/utilities@^1.6.1
Updatedtslib@^2.3.0