@kamkam1_0/discord.js
Version:
Allows you to fully interact with discord's apis
12 lines (11 loc) • 364 B
JavaScript
module.exports = async (bot, datas) => {
const guild = bot.guilds.get(datas.guild_id)
let oldchannel;
if(guild){
oldchannel = guild.channels.get(datas.id)
guild.channels._delete(datas.id)
}else oldchannel = bot.channels.get(datas.id)
bot.channels._delete(datas.id)
bot.emit(name(), bot, oldchannel)
}
function name(){ return "CHANNEL_DELETE" }