Skip to content

Commit

Permalink
Merge pull request #431 from The-4th-Hokage/deepsource-fix-793094b7
Browse files Browse the repository at this point in the history
Replace multiple `==` checks with `in`
  • Loading branch information
Dhruvacube authored Jan 17, 2022
2 parents 8ca36bd + 34c6525 commit 71fde28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions minato_namikaze/discordbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ async def query_member_named(self, guild, argument, *, cache=False):
members = await guild.query_members(argument,
limit=100,
cache=cache)
return discord.utils.find(
lambda m: m.name == argument or m.nick == argument, members)
return discord.utils.find(lambda m: argument in (m.name, m.nick),
members)

async def get_or_fetch_member(self, guild, member_id):
"""Looks up a member in cache or fetches if not found.
Expand Down

0 comments on commit 71fde28

Please sign in to comment.