Conversation
lorenzocorallo
commented
Apr 11, 2026
- poor me
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 7 minutes and 53 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR removes the voting and approval mechanism from the BanAll command. The refactored flow no longer queries Direttivo permissions or embeds voter data; instead, it sends the ban request to Telegram, verifies message delivery, and delegates initiation to a dedicated BanAll module. Changes
Sequence DiagramsequenceDiagram
participant User
participant TgLogger
participant Telegram API
participant BanAll Module
User->>TgLogger: Trigger banAll command
TgLogger->>TgLogger: Log banAll request text
TgLogger->>Telegram API: Send ban notification message
Telegram API-->>TgLogger: Return message with message_id
rect rgba(76, 175, 80, 0.5)
TgLogger->>TgLogger: Verify message_id exists
end
TgLogger->>BanAll Module: initiateBanAll(banAll, message_id)
BanAll Module-->>TgLogger: Acknowledgment
TgLogger-->>User: Return "started" status text
Possibly Related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/modules/tg-logger/index.ts`:
- Line 193: The posted code calls modules.get("banAll").initiateBanAll(banAll,
msg.message_id) but the new BanAll payload lacks outcome, causing
src/modules/moderation/ban-all.ts (initiateBanAll) to throw when it expects
banAll.outcome === "approved"; either update initiateBanAll to accept the new
no-vote flow (remove/guard the outcome check and proceed on missing outcome) or,
as a transitional fix here, set banAll.outcome = "approved" before calling
initiateBanAll so the existing approval check passes (reference
modules.get("banAll").initiateBanAll and the outcome check inside initiateBanAll
in ban-all.ts).
- Around line 177-179: The code still calls banAllMenu and passes reply_markup
when sending the BanAll message even though the BanAll voting UI was removed;
remove the stale wiring by eliminating the await banAllMenu(banAll) call and
remove the reply_markup option from the this.log call that sends
getBanAllText(banAll). Update the block that currently calls banAllMenu,
getBanAllText, and this.log(this.topics.banAll, ..., { reply_markup: menu }) to
simply log the separator and then log getBanAllText(banAll) without any menu or
reply_markup usage; ensure no remaining references to banAllMenu so compilation
succeeds.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 61b981f0-aff0-4bf3-a21c-f83c0657eee8
📒 Files selected for processing (2)
src/modules/tg-logger/ban-all.tssrc/modules/tg-logger/index.ts