forked from Galactic/galactic-bot
guild wrapper compatibility
This commit is contained in:
parent
62d2fe48ab
commit
4eedd21e62
@ -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 = [];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user