diff --git a/discord/guild.py b/discord/guild.py index 2f449beb60..7ce2a4d45b 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -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|