Discord API request
discord_api_requestSends a request to an endpoint of the Discord API with the bot token of an app, like Discord's API docs describe, and returns the JSON it returns. Find the endpoint with search_discord_api first. The bot can only do what its roles allow in a server. Changes happen right away and can't be undone, so only make the ones the user asked for. They're logged in the app's logs and the server's audit log. Big results are shortened to the first items of their lists and the start of long strings, and returned as {"truncated": true, "result": ...}. Use the endpoints the result names, or limit and pagination parameters, for the rest. Never send a shortened list or string back to Discord, like the permission overwrites of a channel, as the left out items would be deleted. Get it in full first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | The JSON body, for endpoints that take one. Give IDs as strings, like Discord's API does. | |
| query | No | The query parameters, a list for repeated ones. Give IDs as strings. | |
| app_id | Yes | The ID of the app, from list_apps. | |
| reason | No | Why, shown in the server's audit log for endpoints that write one. | |
| operation | Yes | The endpoint, like get_guild_member. | |
| path_params | No | The parameters in the path, like {"guild_id": "123"}. |