Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fdg #2293

Closed
wants to merge 9 commits into from
Closed

fdg #2293

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
This is a fork of Pycord used in the SkyKings Public bot.

Pycord
======

Expand Down
23 changes: 23 additions & 0 deletions discord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -3118,6 +3118,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
Loading