fix: don't create new vanity url when there's no ALIASABLE_NAMES flag

This commit is contained in:
CyberL1 2023-05-10 18:57:04 +02:00
parent ba0d1bb6ff
commit 5b3ef06c6b

View File

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