Be more explicit in the utils.find example code.
This commit is contained in:
parent
ab3eab135f
commit
def012e281
@ -180,7 +180,7 @@ def find(predicate, seq):
|
|||||||
"""A helper to return the first element found in the sequence
|
"""A helper to return the first element found in the sequence
|
||||||
that meets the predicate. For example: ::
|
that meets the predicate. For example: ::
|
||||||
|
|
||||||
member = find(lambda m: m.name == 'Mighty', channel.guild.members)
|
member = discord.utils.find(lambda m: m.name == 'Mighty', channel.guild.members)
|
||||||
|
|
||||||
would find the first :class:`~discord.Member` whose name is 'Mighty' and return it.
|
would find the first :class:`~discord.Member` whose name is 'Mighty' and return it.
|
||||||
If an entry is not found, then ``None`` is returned.
|
If an entry is not found, then ``None`` is returned.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user