Admin threads
You can list and delete threads in any guild through the Admin API.
List guild threads
Заголовок раздела «List guild threads»GET
/v1/admin/guilds/{guild_id}/threadsМожно указать причину для журнала аудита.
Returns every thread of a guild, active and archived, with the most recently created first. You need guild:lookup.
Response body
Заголовок раздела «Response body»| Field | Type | Description |
|---|---|---|
| threads | array[thread object] | The threads of the guild |
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 200 | response body | The threads were returned |
An unknown guild ID returns an empty threads array.
The rate limit is 200 requests per minute, on the admin:lookup bucket.
Delete thread
Заголовок раздела «Delete thread»DELETE
/v1/admin/channels/{channel_id}Можно указать причину для журнала аудита.
Deletes a thread with its messages and memberships. You need message:delete_all.
Response
Заголовок раздела «Response»| Status | Body | Condition |
|---|---|---|
| 204 | empty | The thread was deleted |
| 400 | error response | INVALID_CHANNEL_TYPE when the channel is not a thread |
| 404 | error response | UNKNOWN_CHANNEL when no channel has this ID |
Squad sends Thread Delete. If the thread started from a message, it also sends Message Update for that message. The deletion doesn’t show up in the guild’s audit log.
The rate limit is 100 requests per minute, on the admin:message:operation bucket.