@@ -3606,6 +3606,52 @@ def fetch_members(
36063606 itself will not raise anything.
36073607 """
36083608
3609+ @abc .abstractmethod
3610+ async def search_members (
3611+ self ,
3612+ guild : snowflakes .SnowflakeishOr [guilds .PartialGuild ],
3613+ name : str ,
3614+ ) -> typing .Sequence [guilds .Member ]:
3615+ """Search the members in a guild by nickname and username.
3616+
3617+ Parameters
3618+ ----------
3619+ guild : hikari.snowflakes.SnowflakeishOr[hikari.guilds.PartialGuild]
3620+ The object or ID of the guild to search members in.
3621+ name : str
3622+ The query to match username(s) and nickname(s) against.
3623+
3624+ Returns
3625+ -------
3626+ typing.Sequence[hikari.guilds.Member]
3627+ A sequence of the members who matched the provided `name`.
3628+
3629+ Raises
3630+ ------
3631+ hikari.errors.UnauthorizedError
3632+ If you are unauthorized to make the request (invalid/missing token).
3633+ hikari.errors.NotFoundError
3634+ If the guild is not found.
3635+ hikari.errors.RateLimitTooLongError
3636+ Raised in the event that a rate limit occurs that is
3637+ longer than `max_rate_limit` when making a request.
3638+ hikari.errors.RateLimitedError
3639+ Usually, Hikari will handle and retry on hitting
3640+ rate-limits automatically. This includes most bucket-specific
3641+ rate-limits and global rate-limits. In some rare edge cases,
3642+ however, Discord implements other undocumented rules for
3643+ rate-limiting, such as limits per attribute. These cannot be
3644+ detected or handled normally by Hikari due to their undocumented
3645+ nature, and will trigger this exception if they occur.
3646+ hikari.errors.InternalServerError
3647+ If an internal error occurs on Discord while handling the request.
3648+
3649+ !!! note
3650+ Unlike `RESTClient.fetch_members` this endpoint isn't paginated and
3651+ therefore will return all the members in one go rather than needing
3652+ to be asynchronously iterated over.
3653+ """
3654+
36093655 @abc .abstractmethod
36103656 async def edit_member (
36113657 self ,
0 commit comments