Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion TournamentAssistantServer/Utilities/AccountLookup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public class AccountLookup
}

// If we don't have a bot token on our hands, maybe we have a discord id?
if (string.IsNullOrEmpty(name) && (accountId.Length == 17 || accountId.Length == 18))
// Discord id-s (snowflakes) are 17-19 characters long. Add the 19 and allow for easier adjustment in the future
if (string.IsNullOrEmpty(name) && (accountId.Length > 16 && accountId.Length < 20))
{
Logger.Warning($"Looking up info for discord user: {accountId}");
var userInfo = await qualifierBot.GetAccountInfo(accountId);
Expand Down