mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
Fixed resolveChannel when using a string (#857)
This commit is contained in:
committed by
Amish Shah
parent
c1926b6221
commit
cdf66f8011
@@ -117,7 +117,7 @@ class ClientDataResolver {
|
|||||||
if (channel instanceof Channel) return channel;
|
if (channel instanceof Channel) return channel;
|
||||||
if (channel instanceof Message) return channel.channel;
|
if (channel instanceof Message) return channel.channel;
|
||||||
if (channel instanceof Guild) return channel.channels.get(channel.id) || null;
|
if (channel instanceof Guild) return channel.channels.get(channel.id) || null;
|
||||||
if (typeof channel === 'string') return this.client.channels.get(channel.id) || null;
|
if (typeof channel === 'string') return this.client.channels.get(channel) || null;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user