moo.sdk.moderation.suspend

moo.sdk.moderation.suspend(account, duration=None, hours=None, reason='')

Suspend an account, blocking login until the deadline elapses.

Parameters:
  • account – the Player account to suspend

  • duration – a datetime.timedelta, or None for open-ended

  • hours – convenience for verb authors (who cannot import datetime in the sandbox); converted to a duration. Ignored if duration is given.

  • reason – optional free-text reason (recorded in the audit log)

Raises:
  • PermissionError – if the caller is not staff

  • UserError – if the target is missing or is a staff account