Home > Back-end >  Discord JS - Counting voice and text channels
Discord JS - Counting voice and text channels

Time:04-06

Trying to make a counter for text and voice channels. So it should exclude the amoount of categories.

module.exports = async (client) => {
  const guild = client.guilds.cache.get('912706237806829598');

  setInterval(async () => {
    const channelCount = (await guild.channels.fetch()).filter(
      (channel) => channel.type !== 'category'
    ).size;
    const channel = guild.channels.cache.get('960790479925039124');
    channel.setName(`╭           
  • Related