mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-05 10:22:31 +01:00
fix: don't create new vanity url when there's no ALIASABLE_NAMES flag
This commit is contained in:
parent
ba0d1bb6ff
commit
5b3ef06c6b
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user