Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Commit

Permalink
Push Fix for Channel Info
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Ray committed Sep 25, 2018
1 parent a6be89c commit 775313e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions commands/channelinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ const Discord = require("discord.js");


exports.run = async (client, message) => {
const msg = await message.channel.send("Loading...");
const embed = new Discord.RichEmbed()
.setAuthor(message.guild.name, message.guild.iconURL)
.setTitle('Channel Information')
.addField('Name', `${message.channel.name}`, true)
.addField('Category', `${message.channel.parent.name}`, true)
.addField('Topic', `${message.channel.topic}`, true)
if (!message.channel.topic) {
try {
embed.addField('Category', `${message.channel.parent.name}`, true)
} catch(err) {
embed.addField('Category', 'None', true)
}
if (message.channel.topic === null) {
embed.addField('Topic', 'None', true)
}
else {
Expand All @@ -22,12 +26,13 @@ exports.run = async (client, message) => {
embed.addField('NSFW', 'Yes', true)
}
embed.setFooter(client.user.username, client.user.avatarURL)
message.channel.send(embed)
embed.setTimestamp()
msg.edit(embed)
}

exports.conf = {
enabled: true,
guildOnly: false,
guildOnly: true,
aliases: [],
permLevel: "Standard User"
};
Expand Down

0 comments on commit 775313e

Please sign in to comment.