Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Commit

Permalink
Fix a bug where a pin on an unknown channel messes up all the pins
Browse files Browse the repository at this point in the history
  • Loading branch information
vicr123 committed Jan 22, 2019
1 parent 8762657 commit b39ed08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/flag.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,10 @@ function processCommand(message, isMod, command, options) {
let fieldName = $("PINS_PIN_TITLE_COMPACT", {pinNumber})
if (!channel) {
embed.addField(fieldName, $("PINS_CHANNEL_GONE"));
}

if (channel.nsfw && !nsfw) {
embed.addField(fieldName, $("PINS_CHANNEL_NSFW"));
} else {
if (channel.nsfw && !nsfw) {
embed.addField(fieldName, $("PINS_CHANNEL_NSFW"));
}
}

try {
Expand Down

0 comments on commit b39ed08

Please sign in to comment.