mirror of
https://github.com/MelisaDev/melisa.git
synced 2024-11-13 20:07:28 +03:00
edit create_webhook
This commit is contained in:
parent
9a89817b37
commit
aba0aebccd
1 changed files with 1 additions and 4 deletions
|
@ -252,7 +252,6 @@ class Channel(APIModelBase):
|
||||||
async def create_webhook(
|
async def create_webhook(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
channel_id: Optional[Snowflake] = None,
|
|
||||||
name: Optional[str] = None,
|
name: Optional[str] = None,
|
||||||
reason: Optional[str] = None,
|
reason: Optional[str] = None,
|
||||||
):
|
):
|
||||||
|
@ -270,8 +269,6 @@ class Channel(APIModelBase):
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
channel_id: Optional[:class:`~melisa.utils.types.snowflake.Snowflake`]
|
|
||||||
The channel id this webhook is for, if any
|
|
||||||
name: Optional[:class:`str`]
|
name: Optional[:class:`str`]
|
||||||
Name of the webhook (1-80 characters)
|
Name of the webhook (1-80 characters)
|
||||||
reason: Optional[:class:`str`]
|
reason: Optional[:class:`str`]
|
||||||
|
@ -279,7 +276,7 @@ class Channel(APIModelBase):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
await self._http.post(
|
await self._http.post(
|
||||||
f"/channels/{channel_id}/webhooks",
|
f"/channels/{self.id}/webhooks",
|
||||||
headers={"name": name, "X-Audit-Log-Reason": reason},
|
headers={"name": name, "X-Audit-Log-Reason": reason},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue