diff --git a/app/models/feed-data.js b/app/models/feed-data.js index 2372304..d39ce45 100644 --- a/app/models/feed-data.js +++ b/app/models/feed-data.js @@ -57,8 +57,8 @@ module.exports = class FeedData { this.cachedLinks.push(latest); const channel = guild.channels.find(ch => ch.type === "text" && ch.name.toLowerCase() === this.channelName.toLowerCase()); - const role = guild.roles.find(role => role.name.toLowerCase() === this.roleName.toLowerCase()); - channel.send(role + " " + latest); + const role = this.roleName ? guild.roles.find(role => role.name.toLowerCase() === this.roleName.toLowerCase()) : null; + channel.send(role ? role + " " : "" + latest); } } });