@sapphire/framework
Advanced tools
Comparing version 2.0.0-next.dfd1f748.0 to 2.0.0-pr-218.ee962943.0
@@ -1,2 +0,2 @@ | ||
/* Version: 2.0.0-next.dfd1f748.0 - June 27, 2021 13:19:23 */ | ||
/* Version: 2.0.0-pr-218.ee962943.0 - July 5, 2021 01:37:21 */ | ||
'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.dfd1f748.0'; | ||
exports.version = '2.0.0-pr-218.ee962943.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"); | ||
@@ -91,6 +91,6 @@ const StoreRegistry_1 = require("./structures/StoreRegistry"); | ||
.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 */)) { | ||
@@ -97,0 +97,0 @@ plugin.hook.call(this, options); |
@@ -39,3 +39,3 @@ "use strict"; | ||
* │ ├─ commands | ||
* │ ├─ events | ||
* │ ├─ listeners | ||
* │ └─ main.js | ||
@@ -45,5 +45,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. | ||
* | ||
@@ -50,0 +50,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.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 |
{ | ||
"name": "@sapphire/framework", | ||
"version": "2.0.0-next.dfd1f748.0", | ||
"version": "2.0.0-pr-218.ee962943.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,11 +24,11 @@ "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.4", | ||
"@sapphire/discord.js-utilities": "^1.5.10", | ||
"@sapphire/discord-utilities": "^2.1.5", | ||
"@sapphire/discord.js-utilities": "^1.6.0", | ||
"@sapphire/pieces": "~2.0.0", | ||
"@sapphire/ratelimits": "^1.2.3", | ||
"@sapphire/utilities": "^1.6.0", | ||
"@sapphire/ratelimits": "^1.2.5", | ||
"@sapphire/utilities": "^1.6.1", | ||
"lexure": "^0.17.0", | ||
@@ -45,18 +40,17 @@ "tslib": "^2.3.0" | ||
"@commitlint/config-conventional": "^12.1.4", | ||
"@sapphire/eslint-config": "^3.2.0", | ||
"@sapphire/prettier-config": "^1.1.4", | ||
"@sapphire/ts-config": "^2.3.0", | ||
"@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.4", | ||
"@types/ws": "^7.4.5", | ||
"@types/node": "^16.0.0", | ||
"@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.0", | ||
"jest": "^27.0.6", | ||
"jest-circus": "^27.0.6", | ||
"lint-staged": "^11.0.0", | ||
"npm-run-all": "^4.1.5", | ||
"pretty-quick": "^3.1.1", | ||
"rollup": "^2.52.3", | ||
"rollup-plugin-dts": "^3.0.2", | ||
"rollup": "^2.52.7", | ||
"rollup-plugin-version-injector": "^1.3.3", | ||
@@ -66,5 +60,5 @@ "standard-version": "^9.3.0", | ||
"ts-node": "^10.0.0", | ||
"typedoc": "^0.21.0", | ||
"typedoc": "^0.21.2", | ||
"typedoc-plugin-nojekyll": "^1.0.1", | ||
"typescript": "^4.3.4" | ||
"typescript": "^4.3.5" | ||
}, | ||
@@ -71,0 +65,0 @@ "repository": { |
@@ -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 | ||
@@ -30,0 +30,0 @@ - Advanced Plugins Support |
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
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
276865
24
4902