Adding member to channelDelete client Event
Whenever on a Guild a channel gets deleted, return the channel and the member, not only the channel.
This could be useful for example for antiRaid bots, instead of fetching the audit log (which will take a lot more time to act) You could get the member instantly and ban him.
0
-
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 -
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) })0
Accedi per aggiungere un commento.
Commenti
2 commenti