diff options
author | Cyber <mateusz.hf18@gmail.com> | 2023-05-13 10:48:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-13 10:48:42 +0200 |
commit | 654403a8e84918a2fbc517fb3c03fe9d1a4fafb0 (patch) | |
tree | 6310fdec8c083772476be4c1cb80e6b7c54d07d0 | |
parent | fix: don't create new vanity url when there's no ALIASABLE_NAMES flag (diff) | |
parent | Prevent /invites/:code for bots (diff) | |
download | server-654403a8e84918a2fbc517fb3c03fe9d1a4fafb0.tar.xz |
Merge branch 'spacebarchat:master' into master
-rw-r--r-- | src/api/routes/invites/index.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/api/routes/invites/index.ts b/src/api/routes/invites/index.ts index 5a9cd942..6de4d583 100644 --- a/src/api/routes/invites/index.ts +++ b/src/api/routes/invites/index.ts @@ -18,6 +18,7 @@ import { route } from "@spacebar/api"; import { + DiscordApiErrors, emitEvent, getPermission, Guild, @@ -75,6 +76,8 @@ router.post( }, }), async (req: Request, res: Response) => { + if (req.user_bot) throw DiscordApiErrors.BOT_PROHIBITED_ENDPOINT; + const { code } = req.params; const { guild_id } = await Invite.findOneOrFail({ where: { code: code }, |