From 4eedd21e62a78336b40cef51ae9dfa9cfda8f62a Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 15 Mar 2022 02:02:56 +0200 Subject: [PATCH] guild wrapper compatibility --- src/structure/client/Resolver.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/structure/client/Resolver.js b/src/structure/client/Resolver.js index 599eaa4..9c25565 100644 --- a/src/structure/client/Resolver.js +++ b/src/structure/client/Resolver.js @@ -4,6 +4,7 @@ const DiscordClient = require('../DiscordClient'); // eslint-disable-next-line no-unused-vars const Component = require('../interfaces/Component'); const { Constants: { InfractionResolves } } = require('../../constants'); +const { GuildWrapper } = require('./wrappers'); class Resolver { @@ -150,6 +151,7 @@ class Resolver { if (!(resolveables instanceof Array)) resolveables = [resolveables]; if (resolveables.length === 0) return []; if (!guild) throw new Error('Missing guild'); + if (guild instanceof GuildWrapper) ({ guild } = guild); const { roles } = guild; const resolved = []; @@ -218,6 +220,8 @@ class Resolver { if (typeof resolveables === 'string') resolveables = [resolveables]; if (resolveables.length === 0) return []; if (!guild) throw new Error('Missing guild'); + if (guild instanceof GuildWrapper) ({ guild } = guild); + const CM = guild.channels; const resolved = [];