mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-23 00:42:56 +00:00
Fix parameter validation in Guild.query_members
This commit is contained in:
@@ -3547,12 +3547,11 @@ class Guild(Hashable):
|
|||||||
if presences and not self._state._intents.presences:
|
if presences and not self._state._intents.presences:
|
||||||
raise ClientException('Intents.presences must be enabled to use this.')
|
raise ClientException('Intents.presences must be enabled to use this.')
|
||||||
|
|
||||||
if query is None:
|
if query == '':
|
||||||
if query == '':
|
raise ValueError('Cannot pass empty query string.')
|
||||||
raise ValueError('Cannot pass empty query string.')
|
|
||||||
|
|
||||||
if user_ids is None:
|
if query is None and user_ids is None:
|
||||||
raise ValueError('Must pass either query or user_ids')
|
raise ValueError('Must pass either query or user_ids')
|
||||||
|
|
||||||
if user_ids is not None and query is not None:
|
if user_ids is not None and query is not None:
|
||||||
raise ValueError('Cannot pass both query and user_ids')
|
raise ValueError('Cannot pass both query and user_ids')
|
||||||
|
Reference in New Issue
Block a user