diff --git a/main.go b/main.go index 25dfbc9..79d1551 100644 --- a/main.go +++ b/main.go @@ -307,7 +307,7 @@ func DiscordUserParse(usernameRaw string) (username, discriminator string, err e } if !usernameRe.MatchString(usernameRaw) { // for new type username - return usernameRaw, "", nil + return usernameRaw, "0", nil } parsed := usernameRe.FindStringSubmatch(usernameRaw) switch len(parsed) { diff --git a/main_test.go b/main_test.go index 90b5c47..bd29333 100644 --- a/main_test.go +++ b/main_test.go @@ -143,7 +143,7 @@ func TestDiscordUserParse(t *testing.T) { u, d, err := DiscordUserParse("username") assert.Empty(t, err) assert.Equal(t, "username", u) - assert.Empty(t, d) + assert.Equal(t, "0", d) }) }