Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As was discussed in #312, Discord doesn't fulfill the proper spec for unique identification. They return a
User
object withUsername
,Discriminator
, andId
. Discord guarantees a user'sUsername#Discriminator
is unique across the app, so I've used that as the unique ID to be checked. This allows thewhiteList
array to have a list of usernames in the format that Discord users are used to, as opposed to their snowflake id.I also had to bump the docker images go build versions because a dependency requires go1.19 but the images were on go1.18.
An update to Discord's username specifications brings this more inline with other providers and removes discriminators. Now the username field is unique for each user provided they've taken the steps to select one.