diff --git a/melisa/core/http.py b/melisa/core/http.py index 8e127cc..b009011 100644 --- a/melisa/core/http.py +++ b/melisa/core/http.py @@ -72,7 +72,7 @@ class HTTPClient: params: Optional[Dict] = None ) -> Optional[Dict]: """|coro| - Sends a GET request to a Discord REST endpoint. + Sends a GET request to a Discord REST API endpoint. Parameters ---------- @@ -98,7 +98,7 @@ class HTTPClient: data: Optional[Dict] = None ) -> Optional[Dict]: """|coro| - Sends a POST request to a Discord REST endpoint. + Sends a POST request to a Discord REST API endpoint. Parameters ---------- @@ -110,7 +110,7 @@ class HTTPClient: Returns ------- Optional[:class:`Dict`] - JSON response from the discord API. + JSON response from the Discord API. """ return await self.__send( "POST", @@ -118,3 +118,30 @@ class HTTPClient: json=data, ) + async def delete( + self, + route: str, + headers: dict = None + ) -> Optional[Dict]: + """|coro| + Sends a DELETE request to a Discord REST API endpoint. + + Parameters + ---------- + route : :class:`str` + The endpoint to send the request to. + headers : :class:`dict` + Custom request headers + + Returns + ------- + Optional[:class:`Dict`] + JSON response from the Discord API. + """ + return await self.__send( + "DELETE", + route, + headers=headers + ) + +