@sapphire/framework
Advanced tools
Comparing version 2.0.0-next.278b4799.0 to 2.0.0-next.27bbcfb4.0
@@ -1,2 +0,2 @@ | ||
/* Version: 2.0.0-next.278b4799.0 - August 8, 2021 13:27:23 */ | ||
/* Version: 2.0.0-next.27bbcfb4.0 - August 17, 2021 21:54:45 */ | ||
'use strict'; | ||
@@ -47,2 +47,2 @@ | ||
tslib_1.__exportStar(require("./lib/utils/preconditions/PreconditionContainerSingle"), exports); | ||
exports.version = '2.0.0-next.278b4799.0'; | ||
exports.version = '2.0.0-next.27bbcfb4.0'; |
@@ -121,6 +121,7 @@ "use strict"; | ||
const delay = options.cooldownDelay ?? 0; | ||
const filteredUsers = options.cooldownFilteredUsers; | ||
if (limit && delay) { | ||
this.preconditions.append({ | ||
name: "Cooldown" /* Cooldown */, | ||
context: { scope: options.cooldownScope ?? 3 /* User */, limit, delay } | ||
context: { scope: options.cooldownScope ?? 3 /* User */, limit, delay, filteredUsers } | ||
}); | ||
@@ -127,0 +128,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CoreListener = void 0; | ||
const discord_js_utilities_1 = require("@sapphire/discord.js-utilities"); | ||
const discord_js_1 = require("discord.js"); | ||
@@ -43,3 +44,3 @@ const Listener_1 = require("../../lib/structures/Listener"); | ||
async canRunInChannel(message) { | ||
if (message.channel.type === 'DM') | ||
if (discord_js_utilities_1.isDMChannel(message.channel)) | ||
return true; | ||
@@ -46,0 +47,0 @@ const me = message.guild.me ?? (message.client.id ? await message.guild.members.fetch(message.client.id) : null); |
@@ -20,2 +20,5 @@ "use strict"; | ||
return this.ok(); | ||
// If the user has provided any filtered users and the message author is in that array, return ok: | ||
if (context.filteredUsers?.includes(message.author.id)) | ||
return this.ok(); | ||
const ratelimit = this.getManager(command, context).acquire(this.getId(message, context)); | ||
@@ -22,0 +25,0 @@ if (ratelimit.limited) { |
{ | ||
"name": "@sapphire/framework", | ||
"version": "2.0.0-next.278b4799.0", | ||
"version": "2.0.0-next.27bbcfb4.0", | ||
"description": "Discord bot framework built on top of @sapphire/lib for advanced and amazing bots.", | ||
@@ -43,12 +43,12 @@ "main": "dist/index.js", | ||
"@types/jest": "^26.0.24", | ||
"@types/node": "^16.4.13", | ||
"@types/node": "^16.6.1", | ||
"@types/ws": "^7.4.7", | ||
"cz-conventional-changelog": "^3.3.0", | ||
"discord.js": "dev", | ||
"discord.js": "^13.1.0", | ||
"husky": "^7.0.1", | ||
"jest": "^27.0.6", | ||
"jest-circus": "^27.0.6", | ||
"lint-staged": "^11.0.1", | ||
"lint-staged": "^11.1.2", | ||
"pretty-quick": "^3.1.1", | ||
"rollup": "^2.53.2", | ||
"rollup": "^2.56.2", | ||
"rollup-plugin-version-injector": "^1.3.3", | ||
@@ -58,3 +58,3 @@ "standard-version": "^9.3.1", | ||
"ts-node": "^10.1.0", | ||
"typedoc": "^0.21.4", | ||
"typedoc": "^0.21.5", | ||
"typedoc-plugin-nojekyll": "^1.0.1", | ||
@@ -61,0 +61,0 @@ "typescript": "^4.3.5" |
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 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
298652
5230