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:
commit
60394d8c43
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user