tools.discord_moderation module

Discord moderation actions (kick, ban, timeout, block, nickname).

async tools.discord_moderation.run(action, server_id, target_user_id, reason=None, duration_minutes=10, nickname=None, channel_id=None, ctx=None)[source]

Execute this tool and return the result.

Parameters:
  • action (str) – The action value.

  • server_id (str) – The server id value.

  • target_user_id (str) – The target user id value.

  • reason (str | None) – The reason value.

  • duration_minutes (int) – The duration minutes value.

  • nickname (str | None) – The nickname value.

  • channel_id (str | None) – Discord/Matrix channel identifier.

  • ctx (ToolContext | None) – Tool execution context providing access to bot internals.

Returns:

Result string.

Return type:

str