Assert that emoji being updated belongs to the requested guild

This commit is contained in:
Rory&
2026-07-01 19:46:31 +02:00
parent 49c21fb71c
commit 6da128bdfd
@@ -159,6 +159,10 @@ router.patch(
if (body.name?.includes("-")) body.name = body.name?.replaceAll("-", ""); // Dashes are invalid apparently
await Emoji.findOneOrFail({
where: { guild_id: guild_id, id: emoji_id },
});
const emoji = await Emoji.create({
...body,
id: emoji_id,