Skip to content

Fallback to site DB on searches by username #1757

@mbaruh

Description

@mbaruh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: APIRelated to or causes API changesa: moderationRelated to community moderation functionality: (moderation, defcon, verification)l: 1 - intermediatep: 2 - normalNormal Prioritystatus: approvedThe issue has received a core developer's approvalt: enhancementChanges or improvements to existing features

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions