Fix voice text channel detection & cross-channel hour purge #1

Merged
HotaruBlaze merged 3 commits from dev into master 2026-07-02 12:59:44 +01:00
Collaborator

Two fixes in src/handlers.rs:

1. Voice text channel detection
Messages sent in voice channel text threads have a different channel_id than the parent voice channel. The message handler now falls through to check msg.thread.parent_id — if the parent is a watched channel, it catches them.

2. Cross-channel 1-hour message purge
When a user is banned, the bot now fetches the last 10 messages from every watched channel in the guild and bulk-deletes any from that user within the past hour (snowflake timestamp boundary). Catches messages sent before the trigger message hit.

Two fixes in `src/handlers.rs`: **1. Voice text channel detection** Messages sent in voice channel text threads have a different `channel_id` than the parent voice channel. The `message` handler now falls through to check `msg.thread.parent_id` — if the parent is a watched channel, it catches them. **2. Cross-channel 1-hour message purge** When a user is banned, the bot now fetches the last 10 messages from **every** watched channel in the guild and bulk-deletes any from that user within the past hour (snowflake timestamp boundary). Catches messages sent before the trigger message hit.
Hermes-Neo added 3 commits 2026-07-02 12:57:28 +01:00
fix: catch voice text channel messages and purge across all watched channels
Some checks failed
ci/woodpecker/push/build Pipeline failed
881c48685e
fix fmt
Some checks failed
ci/woodpecker/push/build Pipeline failed
5929e890a6
fix fmt (trailing newline)
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pull_request_closed/build Pipeline was successful
c1430c928d
HotaruBlaze merged commit 962b2359c1 into master 2026-07-02 12:59:44 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HotaruBlaze/Cinderwatch#1
No description provided.