Skip to content

Guild Channels

nutmeg edited this page Feb 22, 2023 · 4 revisions

Run Down

Discord+PS improves on how guild channels can be used in a few ways

Channel Count

Discord+PS' channel count uses the guild's channel cache so it may not be accurate until you restart the bot

PSClient.guild.channelCount(?guild);

Channels

PSClient.guild.channels() returns a list of all channels only excluding categories (text, voice, and thread)
Uses the guild's channel cache so it may not update until you restart the bot

PSClient.guild.channels(?guild);

Text Channels

PSClient.guild.textChannels() returns a list of only text channels
Uses the guild's channel cache so it may not update until you restart the bot

PSClient.guild.textChannels(?guild);

// or

PSClient.guild.TCs(?guild);

Voice Channels

PSClient.guild.voiceChannels() returns a list of only voice channels
Uses the guild's channel cache so it may not update until you restart the bot

PSClient.guild.voiceChannels(?guild);

// or

PSClient.guild.VCs(?guild);

Threads

PSClient.guild.threadChannels() returns a list of only thread channels
Uses the guild's channel cache so it may not update until you restart the bot

PSClient.guild.threadChannels(?guild);

// or

PSClient.guild.threads(?guild);

Categories

PSClient.guild.categories() returns a list of only text channels
Uses the guild's channel cache so it may not update until you restart the bot

PSClient.guild.categories(?guild);

Stuff

PSClient.guild.stuff() returns a list of all channels (category, text, voice, and thread)
Uses the guild's channel cache so it may not update until you restart the bot

PSClient.guild.stuff(?guild);

ChannelF

ChannelF is a function that lets you use every channel in a server constantly updating although it's limited due to Discord.JS limitations

PSClient.guild.channelF( (channels) => {
	channels.forEach( (channel) => {
		console.log(channel.id);	
	});
});
Clone this wiki locally