mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-22 00:13:01 +00:00
Add missing parameters to certain methods
- slowmode_delay and reason in Message.create_thread - slowmode_delay in TextChannel.create_thread - reason in Guild.edit_widget
This commit is contained in:
@@ -3335,7 +3335,13 @@ class Guild(Hashable):
|
||||
|
||||
return Widget(state=self._state, data=data)
|
||||
|
||||
async def edit_widget(self, *, enabled: bool = MISSING, channel: Optional[Snowflake] = MISSING) -> None:
|
||||
async def edit_widget(
|
||||
self,
|
||||
*,
|
||||
enabled: bool = MISSING,
|
||||
channel: Optional[Snowflake] = MISSING,
|
||||
reason: Optional[str] = None,
|
||||
) -> None:
|
||||
"""|coro|
|
||||
|
||||
Edits the widget of the guild.
|
||||
@@ -3351,6 +3357,8 @@ class Guild(Hashable):
|
||||
Whether to enable the widget for the guild.
|
||||
channel: Optional[:class:`~discord.abc.Snowflake`]
|
||||
The new widget channel. ``None`` removes the widget channel.
|
||||
reason: Optional[:class:`str`]
|
||||
The reason for editing this widget. Shows up on the audit log.
|
||||
|
||||
Raises
|
||||
-------
|
||||
@@ -3365,7 +3373,7 @@ class Guild(Hashable):
|
||||
if enabled is not MISSING:
|
||||
payload['enabled'] = enabled
|
||||
|
||||
await self._state.http.edit_widget(self.id, payload=payload)
|
||||
await self._state.http.edit_widget(self.id, payload=payload, reason=reason)
|
||||
|
||||
async def chunk(self, *, cache: bool = True) -> Optional[List[Member]]:
|
||||
"""|coro|
|
||||
|
Reference in New Issue
Block a user