mirror of
https://github.com/discordjs/discord.js.git
synced 2026-06-01 16:40:07 +00:00
Several improvements
- Rename Guild#updateChannelPositions -> setChannelPositions - Allow Guild#setChannelPositions to take ChannelResolvables - Prioritise ClientDataResolver#resolveChannel's string case - Minor cleanup
This commit is contained in:
@@ -117,9 +117,9 @@ class ClientDataResolver {
|
||||
*/
|
||||
resolveChannel(channel) {
|
||||
if (channel instanceof Channel) return channel;
|
||||
if (typeof channel === 'string') return this.client.channels.get(channel) || null;
|
||||
if (channel instanceof Message) return channel.channel;
|
||||
if (channel instanceof Guild) return channel.channels.get(channel.id) || null;
|
||||
if (typeof channel === 'string') return this.client.channels.get(channel) || null;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user