Fix error when starring a post for starboard
This commit is contained in:
parent
dc25b67672
commit
49559c14fd
2 changed files with 11 additions and 20 deletions
|
@ -1,5 +1,5 @@
|
|||
import { PluginOptions } from "knub";
|
||||
import { ConfigSchema, StarboardPluginType } from "./types";
|
||||
import { ConfigSchema, defaultStarboardOpts, StarboardPluginType } from "./types";
|
||||
import { zeppelinPlugin } from "../ZeppelinPluginBlueprint";
|
||||
import { trimPluginDescription } from "src/utils";
|
||||
import { GuildSavedMessages } from "src/data/GuildSavedMessages";
|
||||
|
@ -89,6 +89,16 @@ export const StarboardPlugin = zeppelinPlugin<StarboardPluginType>()("starboard"
|
|||
`),
|
||||
},
|
||||
|
||||
configPreprocessor(options) {
|
||||
if (options.config?.boards) {
|
||||
for (const [name, opts] of Object.entries(options.config.boards)) {
|
||||
options.config.boards[name] = Object.assign({}, defaultStarboardOpts, options.config.boards[name]);
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
},
|
||||
|
||||
// prettier-ignore
|
||||
commands: [
|
||||
MigratePinsCmd,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue