Adding member to channelDelete client Event

Comments

2 comments

  • Jules

    Last time I checked (on Discord.JS anyway) the Client channelDelete event returns a Channel with type of DMChannel or GuildChannel which gives access to "members". I'd have thought you would be able to use channel.members or something

    -1
  • Pearlie

    I am making a alert system where if someone deletes a channel it sends a message with the name of the channel that was deleted and the Deleter, so i tried making it by coding this :

    client.on('channelDelete', channel => {
      var channelDeleteAuthor = channelDelete.action.author
      const lChannel = message.channels.find(ch => ch.name === 'bot-logs')
      if (!channel) return; channel.send(`Channel Deleted by ${channelDeleteAuthor}`)
      .then(message => console.log(`Channel Deleted by ${channelDeleteAuthor}`))
      .catch(console.error)
    
    })

     

     

    www.mybpcreditcard.com

    0

Please sign in to leave a comment.