mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 08:56:19 +00:00
Type up **kwargs of various methods
This commit is contained in:
@ -175,7 +175,7 @@ class WidgetMember(BaseUser):
|
||||
else:
|
||||
activity = create_activity(game)
|
||||
|
||||
self.activity: Optional[Union[BaseActivity, Spotify]] = activity
|
||||
self.activity: Optional[Union[BaseActivity, Spotify]] = activity
|
||||
|
||||
self.connected_channel: Optional[WidgetChannel] = connected_channel
|
||||
|
||||
@ -277,10 +277,10 @@ class Widget:
|
||||
"""Optional[:class:`str`]: The invite URL for the guild, if available."""
|
||||
return self._invite
|
||||
|
||||
async def fetch_invite(self, *, with_counts: bool = True) -> Optional[Invite]:
|
||||
async def fetch_invite(self, *, with_counts: bool = True) -> Invite:
|
||||
"""|coro|
|
||||
|
||||
Retrieves an :class:`Invite` from a invite URL or ID.
|
||||
Retrieves an :class:`Invite` from the widget's invite URL.
|
||||
This is the same as :meth:`Client.fetch_invite`; the invite
|
||||
code is abstracted away.
|
||||
|
||||
@ -293,10 +293,9 @@ class Widget:
|
||||
|
||||
Returns
|
||||
--------
|
||||
Optional[:class:`Invite`]
|
||||
The invite from the URL/ID.
|
||||
:class:`Invite`
|
||||
The invite from the widget's invite URL.
|
||||
"""
|
||||
if self._invite:
|
||||
invite_id = resolve_invite(self._invite)
|
||||
data = await self._state.http.get_invite(invite_id, with_counts=with_counts)
|
||||
return Invite.from_incomplete(state=self._state, data=data)
|
||||
invite_id = resolve_invite(self._invite)
|
||||
data = await self._state.http.get_invite(invite_id, with_counts=with_counts)
|
||||
return Invite.from_incomplete(state=self._state, data=data)
|
||||
|
Reference in New Issue
Block a user