-
-
Notifications
You must be signed in to change notification settings - Fork 751
Fallback to site DB on searches by username #1757
Copy link
Copy link
Open
Labels
a: APIRelated to or causes API changesRelated to or causes API changesa: moderationRelated to community moderation functionality: (moderation, defcon, verification)Related to community moderation functionality: (moderation, defcon, verification)l: 1 - intermediatep: 2 - normalNormal PriorityNormal Prioritystatus: approvedThe issue has received a core developer's approvalThe issue has received a core developer's approvalt: enhancementChanges or improvements to existing featuresChanges or improvements to existing features
Metadata
Metadata
Assignees
Labels
a: APIRelated to or causes API changesRelated to or causes API changesa: moderationRelated to community moderation functionality: (moderation, defcon, verification)Related to community moderation functionality: (moderation, defcon, verification)l: 1 - intermediatep: 2 - normalNormal PriorityNormal Prioritystatus: approvedThe issue has received a core developer's approvalThe issue has received a core developer's approvalt: enhancementChanges or improvements to existing featuresChanges or improvements to existing features
Type
Fields
Give feedbackNo fields configured for issues without a type.
We sometimes need to query user data such as the user or infractions embed, when all we have is the username.
Since the site DB stores user ID's and usernames, and already has an endpoint to retrieve stored data based on username, we can use that in case the user is not in the guild and we try to query by their username. That way we can get the user's ID and query based on it as usual.
This can be implemented by improving the FetchedUser converter to handle cases where the given arguement doesn't represent an integer.