Skip to content

Commit

Permalink
Update guild.py
Browse files Browse the repository at this point in the history
Signed-off-by: plun1331 <[email protected]>
  • Loading branch information
plun1331 authored Nov 6, 2023
1 parent a24b431 commit 639b42f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions discord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -3093,6 +3093,29 @@ async def unban(self, user: Snowflake, *, reason: str | None = None) -> None:
"""
await self._state.http.unban(user.id, self.id, reason=reason)

async def add_member_roles(self, member: int, role: Role, *, reason: str | None = None) -> None:
"""|coro|
Adds a role to a guild member with the specified ID.
Parameters
----------
member: :class:`int`
The member's ID.
role: :class:`Role`
The role to add.
reason: Optional[:class:`str`]
The reason for doing this action. Shows up on the audit log.
Raises
------
Forbidden
You do not have the proper permissions to add the role.
HTTPException
Role adding failed.
"""
await self._state.http.add_role(self.id, member, role.id, reason=reason)

async def vanity_invite(self) -> Invite | None:
"""|coro|
Expand Down

0 comments on commit 639b42f

Please sign in to comment.