Currently this function is searching for a member that starts with the input query. For example, if i input ja
, it will output all members that have their names start with ja
. However, i am trying to make it so it accounts for all names that have ja
in their name. Hence, it will not only include jack, jasper
but include kaja, maja
etc.
@staticmethod
async def search_members(guild, member) -> typing.List[discord.Member]:
return [i for i in guild.members if str(i).lower().startswith(member.lower())]