From 3e7cb47438912da222886b13492e2d42c47c1bd7 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Fri, 4 Mar 2022 16:57:07 +0700 Subject: [PATCH] Add unique flag --- Bot/InviteTracker.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bot/InviteTracker.fs b/Bot/InviteTracker.fs index 0e21487..b4084c2 100644 --- a/Bot/InviteTracker.fs +++ b/Bot/InviteTracker.fs @@ -98,7 +98,7 @@ let getInvitedUsers userId = let createGuildInvite (ctx : IDiscordContext) = task { let channel = ctx.GetGuild().Channels.[GuildEnvironment.channelWelcome] - let! invite = channel.CreateInviteAsync(max_age = 86400) + let! invite = channel.CreateInviteAsync(max_age = 86400, unique = true) // When a player generates an invite code but it hasn't expired, it generates the same code, creating a duplicate entry // so catch the exception thrown because the code column is unique