showing results for - "channel info discord js"
Tim
28 Apr 2020
1// COMPLICATED SCRIPT DONT DISLIKE IF YOU CANT UNDERSTAND //
2
3client.on('message', message => {
4    if (message.content.toLowerCase() === prefix + 'channel') {
5        if (message.author.bot) return;
6        if (UtilCommandsDisable.has(message.guild.id)) {
7            message.channel.send("**Util Commands are Disabled in This Server**")
8        } else if (!UtilCommandsDisable.has(message.guild.id)) {
9            message.delete()
10            const ChannelName = message.channel.name
11            const ChannelId = message.channel.id
12            const ChannelCategory = message.channel.parent
13            const ChannelCategoryID = message.channel.parentID
14            const LastPinAt = message.channel.lastPinAt
15            const ChannelInfo = new Discord.MessageEmbed()
16                .setColor('#b700ff')
17                .setTitle('Channel Info')
18                .addField("Channel Name : ", `${ChannelName}`)
19                .addField("Channel ID : ", `${ChannelId}`)
20                .addField("Category Name : ", `${ChannelCategory}`)
21                .addField("Category ID : ", `${ChannelCategoryID}`)
22                .addField("Last Pinned Message Date : ", `${LastPinAt}`)
23                .setFooter(`Thanks For Using ${client.user.tag}`, BotPFP);
24            message.channel.send(ChannelInfo)
25        }
26    }
27})