From 3f1c924b9c5b2d734c04786d4873698d22bf76d8 Mon Sep 17 00:00:00 2001 From: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com> Date: Wed, 18 May 2022 16:04:02 +0000 Subject: [PATCH] fix: permissions plugin should return valid type --- plugins/permissions/mod.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/permissions/mod.ts b/plugins/permissions/mod.ts index 33ba416c5..b62a174ee 100644 --- a/plugins/permissions/mod.ts +++ b/plugins/permissions/mod.ts @@ -1,4 +1,4 @@ -import { BotWithCache } from "./deps.ts"; +import { Bot, BotWithCache } from "./deps.ts"; import setupChannelPermChecks from "./src/channels/mod.ts"; import setupDiscoveryPermChecks from "./src/discovery.ts"; import setupEditMember from "./src/editMember.ts"; @@ -14,7 +14,7 @@ import setupRolePermChecks from "./src/roles/mod.ts"; import setupWebhooksPermChecks from "./src/webhooks/mod.ts"; // PLUGINS MUST TAKE A BOT ARGUMENT WHICH WILL BE MODIFIED -export function enablePermissionsPlugin(bot: BotWithCache) { +export function enablePermissionsPlugin(bot: B): B { // PERM CHECKS REQUIRE CACHE DUH! if (!bot.enabledPlugins?.has("CACHE")) { throw new Error("The PERMISSIONS plugin requires the CACHE plugin first.");