0

I've been using discord.py for some time.I got stuck with this problem.I couldn't understand member:discord.Member statement.How does that help us in that module or in general?If I want to run this funct,which type of argument I should pass for member: discord.Member ?

async def mute(self,ctx, member: discord.Member, *, reason=None):

Ps:discord is a name of the module and Member is a class in this module

hARASİVa
  • 15
  • 5
  • 1
    It's a [type hint.](https://docs.python.org/3/library/typing.html) It's basically telling the user, "hey the parameter `member` needs to be of this type". Python doesn't enforce type hints; they're purely for documentation. There are some modules that can perform type-checking and enforcement. – ddejohn Sep 21 '21 at 14:53
  • You need to obtain some instance of `discord.Member` class, and pass it. In the current example this passed member will be muted. – Alexey S. Larionov Sep 21 '21 at 14:54

0 Answers0