Skip to content
Changelog

chat.moderate

Deletes a chat message, or times out or bans its sender, as the account signed in to that platform.

JSON-RPC 2.0project.write

Works where Lightair can moderate that platform's chat, as the Chat panel's buttons do. Timeouts last seconds, 600 by default, at most two weeks.

Parameters

  • messagestring | numberrequiredThe message's id, or its platform id.
  • actionstringrequireddelete, timeout or ban.
  • secondsnumberA timeout's length. duration_s is taken too.
  • reasonstringWhy.

Result

  • donebooleantrue.

Errors

Invalid params (-32602) without action, or for an unknown one. Not found (-32004) for an unknown message. A state error (-32005) where that platform can't be moderated from Lightair, when the message has no platform id (delete) or no sender (timeout, ban), for unban, or when the platform refuses.

From an AI agent

The MCP server's moderate_chat (action: delete, timeout or ban) reaches this method.

Example

ws://localhost:4455/rpc
{
"jsonrpc": "2.0",
"id": 1,
"method": "chat.moderate",
"params": {
"message": 1042,
"action": "timeout",
"seconds": 300
}
}

Result

{ "done": true }

chat.history