signal-bot/fake_signal/scenarios/mute_command.yaml
Krzysztof kuhy Rudnicki 41df308393
Some checks are pending
CI / check (push) Waiting to run
CI / web (push) Waiting to run
feat: !cisza silences the bot in one group for up to ten minutes
Anybody may ask; ten quiet minutes is the whole downside, so there is no
trust gate on the way in and no cooldown. The confirmation is the last
thing said: below it the dispatcher drops every reply in that group --
commands, the near-miss suggestion, and the nightly report, which is
held back (never marked) rather than lost. Messages are still counted.

!odcisz is the one command that runs through a mute, and only for
TRUSTED_INVITERS; a stranger is refused without a reply, because a
refusal is a reply. Unset, anybody may -- the same reading InviteTrust
gives an unset variable, now shared as trust.is_trusted.

There is deliberately no !unmute alias: it is one edit from !mute, and
tests/test_nearest.py forbids two commands within reach of each other.

The state is a deadline in group_meta, so it survives a restart and a
reload and is cleared with the group. tests/test_help_command.py hit
the 250-line cap and its album half moved to tests/test_help_album.py.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-04 10:31:08 +02:00

17 lines
830 B
YAML

# One confirmation, then nothing -- not even for a command that would
# otherwise be served -- until the unmute, which is the only word that gets
# through. The suite runs TRUSTED_INVITERS empty, so anybody may end it,
# and the scenario MUST end unmuted: every later file shares this process
# and this group, and a mute left standing would silence all of them.
name: "!cisza silences the group until !odcisz"
inject:
- { text: "!cisza 1", uuid: uuid-mona, name: Mona }
- { text: "!cat", uuid: uuid-mona, name: Mona }
- { text: "!cta", uuid: uuid-mona, name: Mona }
- { text: "!odcisz", uuid: uuid-mona, name: Mona }
- { text: "!cat", uuid: uuid-mona, name: Mona }
expect:
- { kind: text, to: reply, contains: "CISZA PRZEZ 1 MINUTĘ" }
- { kind: text, to: reply, contains: "WRACAM" }
- { kind: image, to: reply }