summary refs log tree commit diff
path: root/src/routes/channels/#channel_id/pins.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/channels/#channel_id/pins.ts')
-rw-r--r--src/routes/channels/#channel_id/pins.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routes/channels/#channel_id/pins.ts b/src/routes/channels/#channel_id/pins.ts

index 6d938b79..ccb909b8 100644 --- a/src/routes/channels/#channel_id/pins.ts +++ b/src/routes/channels/#channel_id/pins.ts
@@ -18,7 +18,7 @@ router.put("/:message_id", async (req: Request, res: Response) => { if (channel.guild_id) permission.hasThrow("MANAGE_MESSAGES"); const pinned_count = await MessageModel.count({ channel_id, pinned: true }).exec(); - const { maxPins } = (Config.apiConfig.getAll() as Config.DefaultOptions).limits.channel; + const { maxPins } = Config.apiConfig.getAll().limits.channel; if (pinned_count >= maxPins) throw new HTTPError("Max pin count reached: " + maxPins); await MessageModel.updateOne({ id: message_id }, { pinned: true }).exec();