Fetching Channels - shysolocup/willclient GitHub Wiki

Fetching channels is taking an id or a mention (#channel or <#id>) and returning the channel's info
If the channel does not exist it returns null
Cache channel fetching is called with PSClient.fetchChannel() and it uses the bot's channel cache to return the channel's info
let channel = PSClient.fetchChannel(channel);
Guild channel fetching is called with PSClient.fetchGuildChannel() and it uses the guild to return the channel's info
It also has an optional guild value if you wish to use it and it defaults to ctx.guild
let channel = await PSClient.fetchGuildChannel(channel);
// or for guild
let channel = await PSClient.fetchGuildChannel(channel, guild);
- Description: Fetches the info for a channel using the bot's cache
- Setup: PSClient.fetchChannel(channel)
-
Returns:
Channel
- Description: Fetches the info for a channel using the guild
- Setup: await PSClient.fetchGuildChannel(channel, ?guild)
-
Returns:
Guild Channel