Merge pull request #1054 from CyberL1/master

fix: don't create new vanity url when there's no ALIASABLE_NAMES flag
This commit is contained in:
Madeline
2023-05-13 19:12:18 +10:00
committed by GitHub

View File

@@ -107,6 +107,17 @@ router.patch(
where: { guild_id, type: ChannelType.GUILD_TEXT },
});
if (!guild.features.includes("ALIASABLE_NAMES")) {
await Invite.update(
{ guild_id },
{
code: code,
},
);
return res.json({ code });
}
await Invite.create({
vanity_url: true,
code: code,