mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-14 21:31:50 +00:00
starboard: fix 'channel already has a starboard' error not resetting the setup state properly
This commit is contained in:
parent
dced441d09
commit
6dc8536da6
1 changed files with 2 additions and 1 deletions
|
@ -18,7 +18,7 @@ import { GuildSavedMessages } from "../data/GuildSavedMessages";
|
|||
import { SavedMessage } from "../data/entities/SavedMessage";
|
||||
|
||||
export class StarboardPlugin extends ZeppelinPlugin {
|
||||
public static pluginName = 'starboard';
|
||||
public static pluginName = "starboard";
|
||||
|
||||
protected starboards: GuildStarboards;
|
||||
protected savedMessages: GuildSavedMessages;
|
||||
|
@ -81,6 +81,7 @@ export class StarboardPlugin extends ZeppelinPlugin {
|
|||
const existingStarboard = await this.starboards.getStarboardByChannelId(starboardChannel.id);
|
||||
if (existingStarboard) {
|
||||
msg.channel.createMessage("That channel already has a starboard. Try again?");
|
||||
starboardChannel = null;
|
||||
continue;
|
||||
}
|
||||
} while (starboardChannel == null);
|
||||
|
|
Loading…
Add table
Reference in a new issue