We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29d224e commit 43f46aaCopy full SHA for 43f46aa
discord/client.py
@@ -2095,6 +2095,27 @@ async def fetch_invite(
2095
)
2096
return Invite.from_incomplete(state=self._connection, data=data)
2097
2098
+ async def create_invite(self) -> Invite:
2099
+ """|coro|
2100
+
2101
+ Creates a new friend :class:`.Invite`.
2102
2103
+ .. versionadded:: 2.0
2104
2105
+ Raises
2106
+ ------
2107
+ HTTPException
2108
+ Creating the invite failed.
2109
2110
+ Returns
2111
+ --------
2112
+ :class:`.Invite`
2113
+ The created friend invite.
2114
+ """
2115
+ state = self._connection
2116
+ data = await state.http.create_friend_invite()
2117
+ return Invite.from_incomplete(state=state, data=data)
2118
2119
async def accept_invite(self, url: Union[Invite, str], /) -> Invite:
2120
"""|coro|
2121
0 commit comments