Skip to content

Commit

Permalink
Merge pull request #45 from ueckoken/disable-role-delete
Browse files Browse the repository at this point in the history
バグを修正
  • Loading branch information
csenet authored Apr 12, 2024
2 parents d310353 + d40ae2a commit 4a62929
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}

Expand Down

0 comments on commit 4a62929

Please sign in to comment.