Skip to content

Commit f9cd72d

Browse files
authored
Merge branch 'skykings/user-installable' into feat/ua
Signed-off-by: plun1331 <[email protected]>
2 parents 007348d + 6cdb3e3 commit f9cd72d

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

README.rst

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
This is a fork of Pycord used in the SkyKings Public bot.
2+
13
Pycord
24
======
35

discord/guild.py

+23
Original file line numberDiff line numberDiff line change
@@ -3121,6 +3121,29 @@ async def unban(self, user: Snowflake, *, reason: str | None = None) -> None:
31213121
"""
31223122
await self._state.http.unban(user.id, self.id, reason=reason)
31233123

3124+
async def add_member_roles(self, member: int, role: Role, *, reason: str | None = None) -> None:
3125+
"""|coro|
3126+
3127+
Adds a role to a guild member with the specified ID.
3128+
3129+
Parameters
3130+
----------
3131+
member: :class:`int`
3132+
The member's ID.
3133+
role: :class:`Role`
3134+
The role to add.
3135+
reason: Optional[:class:`str`]
3136+
The reason for doing this action. Shows up on the audit log.
3137+
3138+
Raises
3139+
------
3140+
Forbidden
3141+
You do not have the proper permissions to add the role.
3142+
HTTPException
3143+
Role adding failed.
3144+
"""
3145+
await self._state.http.add_role(self.id, member, role.id, reason=reason)
3146+
31243147
async def vanity_invite(self) -> Invite | None:
31253148
"""|coro|
31263149

0 commit comments

Comments
 (0)