Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Overview
**Name:** Remaining7 Discord Bot
**Version:** v1.9.2
**Version:** v1.10.0
**Contributors:** remainingdelta, nightwarrior5
**Objective:** A feature-rich Discord bot for the Remaining7 community server (16k+ members). Handles an R7 Token economy, leveling, quests, a Brawl Stars collection minigame, tournament management with Matcherino integration, support tickets, event operations, a security protocol, and multi-language translation.
**Server Link:** https://discord.gg/6MzrjS2X8k
Expand Down Expand Up @@ -42,6 +42,8 @@ Remaining7-Discord-Bot/
│ ├── event.py # Event channel cleanup & reward payouts
│ ├── general.py # /help, /mod-help, /admin-help, /version, /convert-time
│ ├── translation.py # !t prefix & /translate slash command (55 languages)
│ ├── counting.py # Sequential counting game with /set-count
│ ├── sticky.py # !sticky / !unsticky persistent channel messages
│ ├── support_tickets.py # General support tickets (issues, support, apps, partnership)
│ ├── github_tickets.py # AI-powered GitHub issue creation from tickets (Gemini)
│ ├── ticket_command_router.py # Shared routing for tourney & support ticket commands
Expand Down Expand Up @@ -91,10 +93,14 @@ Remaining7-Discord-Bot/
- `/levels-leaderboard [page]` — server-wide level rankings (paginated).

### Quest System
- **Daily Quests:** 80 / 160 / 240 messages → 50–100 tokens + 200–300 XP.
- **Weekly Quests:** 500 / 750 / 1000 messages → 250–600 tokens + 1000–3000 XP.
- `/quests` — interactive progress bars for active quests.
- Quests auto-assign randomly; completion rewards are granted instantly.
Every user always has **4 active quests** — one daily and one weekly per category:
- **Daily Message Quests:** 80 / 160 / 240 messages → 50 / 115 / 250 tokens + 100 / 200 / 300 XP.
- **Weekly Message Quests:** 500 / 750 / 1000 messages → 225 / 400 / 640 tokens + 1000 / 2000 / 3000 XP.
- **Daily Megabox Quest:** Open 100 Mega Boxes or Starr Drops → 50 tokens + 100 XP.
- **Weekly Megabox Quest:** Open 500 Mega Boxes or Starr Drops → 250 tokens + 500 XP.
- `/quests` — interactive progress bars for all 4 active quests.
- `/reset-quests <user>` (Admin) — force-reset a user's quest assignments.
- Quests auto-assign randomly per slot; completion rewards are granted instantly.

### Brawl Stars Collection Minigame
- **Gacha Drops:**
Expand Down Expand Up @@ -135,6 +141,9 @@ Remaining7-Discord-Bot/
- **Rate Limits:** Max 3 open tickets per user, 180s cooldown. Auto-reopen after 6-hour lock.
- **Auto-translation:** Ticket messages auto-translated via `deep-translator` + `langdetect`.
- **Test Mode:** `/tourney-test-mode` — toggle 100-ticket limit and 0.1s cooldown for testing.
- **Active Matches:** `/active-matches` — display all active match scores grouped by round.
- **Monthly Reports:** Auto-generated monthly tournament reports posted to a dedicated archive channel. Matcherino ID is auto-detected on `!starttourney`.
- **Slow Mode:** `!starttourney` enables 60s slow mode in general chat with a public notice; auto-removed after 1 hour (or immediately on `!endtourney`).
- **Staff Guide:** `/tourney-admin-help`.
- **SA Mode:** South America region variant with separate ticket categories and region-specific workflow.

Expand Down Expand Up @@ -162,9 +171,10 @@ Remaining7-Discord-Bot/

### Event Management
- **Automated Monitoring:** Daily background task at 12:00 AM ET scans event channels.
- **Smart Alerts:** Alert sent when messages are 7+ days old (prevents exceeding Discord's 14-day bulk-delete limit).
- **Smart Alerts:** Alert sent when messages are 7+ days old (prevents exceeding Discord's 14-day bulk-delete limit). Previous day's alert is replaced instead of stacking.
- **Manual Cleanup:** `/clear-red`, `/clear-blue`, `/clear-green` for instant channel wipes.
- **Reward Payouts:** `/event-rewards <message_id>` parses `@User 500` format to batch-distribute tokens with confirmation.
- **Poll Rewards:** `/poll-rewards <message_id>` distributes tokens to all users who voted on a poll.
- **Staff Guide:** `/event-staff-help`.

### Security Protocol
Expand All @@ -178,6 +188,14 @@ Remaining7-Discord-Bot/
- `/translate <language> <phrase>` — translate English text into any of 55 supported languages.
- Auto-detects source language. Google Translate backend.

### Counting Game
- Sequential counting game in a designated channel — users must send the next number in sequence.
- `/set-count <number>` (Staff) — manually set the current count.

### Sticky Messages
- `!sticky <message>` — pin a message that reposts automatically when other messages are sent.
- `!unsticky` — remove the active sticky message from a channel.

### Utility
- `/convert-time <date> <time> <timezone>` — convert a date and time to all Discord timestamp formats. Supports 20+ timezone aliases (EST, PT, GMT, etc.) and IANA names.
- `/version` — view the bot's current version.
Expand Down Expand Up @@ -258,7 +276,7 @@ Uses MongoDB database `r7_bot_db` with the following collections:
| Task | Schedule | Description |
|---|---|---|
| Message listener | On every message | XP generation; passive token earning restricted to general chat (20s cooldown) |
| Quest tracker | On every message in general chat | Track quest progress, auto-complete and reward |
| Quest tracker | On every message / megabox open | Track message & megabox quest progress, auto-complete and reward |
| Event cleanup | Daily at 12:00 AM ET | Scan event channels for stale messages |
| Queue dashboard | Every 15 seconds | Update tourney queue embed during live tournaments |
| Supply drop | Every 6 hours | Random token drop in general chat |
Expand Down
21 changes: 20 additions & 1 deletion features/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ async def help_command(self, interaction: discord.Interaction):
)
embed.add_field(name="🌐 Translation", value=translation_text, inline=False)

counting_text = (
"Type the next number in sequence in the counting channel!\n"
"*(Stay on track — any wrong number resets the count)*"
)
embed.add_field(name="🔢 Counting Game", value=counting_text, inline=False)

utility_text = (
"`/convert-time` - Convert a date and time to Discord timestamp formats\n"
"`/version` - View the bot's current version"
Expand Down Expand Up @@ -108,6 +114,14 @@ async def mod_help(self, interaction: discord.Interaction):
)
embed.add_field(name="🚨 Security Protocol", value=security_text, inline=False)

# Server Tools
tools_text = (
"`/set-count <number>` - Manually set the current count in the counting channel.\n"
"`!sticky <message>` - Pin a message that reposts whenever others send in that channel.\n"
"`!unsticky` - Remove the active sticky message from a channel."
)
embed.add_field(name="🔧 Server Tools", value=tools_text, inline=False)

await interaction.response.send_message(embed=embed, ephemeral=True)

@app_commands.command(
Expand Down Expand Up @@ -141,7 +155,8 @@ async def admin_help(self, interaction: discord.Interaction):
# --- Event Operations ---
event_text = (
"`/event-rewards <msg_id>` - Process token distribution from an announcement message.\n"
"*(Requires formatting: @User 500)*"
"`/poll-rewards <msg_id>` - Distribute tokens to all users who voted on a poll.\n"
"*(Requires formatting: @User 500 for event-rewards)*"
)
embed.add_field(name="🏆 Event Operations", value=event_text, inline=False)

Expand All @@ -167,6 +182,10 @@ async def admin_help(self, interaction: discord.Interaction):
name="⚔️ Tournament & Financials", value=tourney_text, inline=False
)

# --- Quest Management ---
quest_text = "`/reset-quests <user>` - Force-reset a user's quest assignments."
embed.add_field(name="📜 Quest Management", value=quest_text, inline=False)

# Ephemeral = True ensures only the Admin sees this menu
await interaction.response.send_message(embed=embed, ephemeral=True)

Expand Down
1 change: 1 addition & 0 deletions features/tourney/tourney_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2585,6 +2585,7 @@ async def tourney_admin_help(interaction: discord.Interaction):
"`/set-matcherino` - Set the active Matcherino bracket ID for the session.\n"
"`/match-info` - Show live rosters, scores, and match status for a match number.\n"
"`/match-history` - Show a team's previous rounds for a given match.\n"
"`/active-matches` - Display all active match scores grouped by round.\n"
"`/set-ticket-match` - Correct this ticket's match number or team name.\n"
"`/tourney-progress` - Real-time bracket health check with stage announcements."
)
Expand Down
Loading