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
21 changes: 17 additions & 4 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.7.5
**Version:** v1.9.2
**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 All @@ -15,6 +15,7 @@
- **Database:** MongoDB Atlas via `motor` (async)
- **Translation:** `deep-translator` + `langdetect`
- **External API:** Matcherino (tournament brackets, payouts)
- **AI Integration:** Gemini API (GitHub issue generation)
- **Linting:** Ruff (`ruff check .` / `ruff format .`)

---
Expand All @@ -23,7 +24,10 @@
```
Remaining7-Discord-Bot/
├── main.py # Entry point — loads cogs, syncs commands
├── pyproject.toml # Project metadata and version
├── requirements.txt
├── Makefile
├── LICENSE
├── .env.example
├── .gitignore
├── CLAUDE.md
Expand All @@ -36,9 +40,10 @@ Remaining7-Discord-Bot/
│ ├── quests.py # Daily & weekly quest system
│ ├── security.py # Hacked protocol (timeout, purge, flag)
│ ├── event.py # Event channel cleanup & reward payouts
│ ├── general.py # /help, /mod-help, /admin-help, /convert-time
│ ├── general.py # /help, /mod-help, /admin-help, /version, /convert-time
│ ├── translation.py # !t prefix & /translate slash command (55 languages)
│ ├── 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
│ ├── brawl/
│ │ ├── brawlers.json # Brawler data (name, rarity, gadgets, star powers, hypercharges)
Expand All @@ -64,7 +69,7 @@ Remaining7-Discord-Bot/
## Core Features

### R7 Token Economy
- **Passive Income:** Users earn 2–5 R7 Tokens per message (20-second cooldown). Server Boosters get a 2% average bonus.
- **Passive Income:** Users earn 2–5 R7 Tokens per message (20-second cooldown). Server Boosters get a 5% increase in tokens on average.
- **Daily Rewards:** `/daily` grants 80–160 tokens (scaled by level). Requires 5 messages sent since last claim and a 24-hour cooldown.
- **Supply Drop:** `/drop <amount>` (Admin) to force a token drop in general chat.
- **Balance & Ranking:** `/balance [user]`, `/leaderboard [page]`.
Expand Down Expand Up @@ -150,6 +155,11 @@ Remaining7-Discord-Bot/
- Staff can close, reopen, and delete tickets with transcript generation.
- Transcripts DM'd to the opener and archived in a log channel.

### GitHub Ticket Integration
- AI-powered GitHub issue creation from support tickets using Gemini.
- Automatically generates structured bug reports, feature requests, and enhancement issues from ticket conversations.
- Requires `GEMINI_TOKEN` and `GITHUB_TOKEN` environment variables.

### 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).
Expand All @@ -170,6 +180,7 @@ Remaining7-Discord-Bot/

### 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.

### Help Commands
- `/help` — user command directory.
Expand Down Expand Up @@ -206,10 +217,12 @@ This bot requires **Python 3.10+** and a **MongoDB Atlas** database.
PROD_TOKEN= # Production bot token (used when BOT_MODE=PROD)
DEV_TOKEN= # Dev/test bot token (used when BOT_MODE=DEV)
MONGO_URI= # MongoDB Atlas connection string
GEMINI_TOKEN= # Gemini API key for AI-powered GitHub issue creation
GITHUB_TOKEN= # GitHub PAT with 'repo' scope for issue creation
```

4. **Update Configuration**
Verify and update IDs in `features/config.py` (channels, roles, categories, emojis) for your server. Both `REAL` and `TEST` branches must be maintained.
Verify and update IDs in `features/config.py` (channels, roles, categories, emojis) for your server. Both `PROD` and `DEV` branches must be maintained.

5. **Run the Bot**
```bash
Expand Down
3 changes: 2 additions & 1 deletion features/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ async def help_command(self, interaction: discord.Interaction):
embed.add_field(name="🌐 Translation", value=translation_text, inline=False)

utility_text = (
"`/convert-time` - Convert a date and time to Discord timestamp formats"
"`/convert-time` - Convert a date and time to Discord timestamp formats\n"
"`/version` - View the bot's current version"
)
embed.add_field(name="🔧 Utility", value=utility_text, inline=False)

Expand Down
2 changes: 2 additions & 0 deletions features/tourney/tourney_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2414,6 +2414,8 @@ async def tourney_admin_help(interaction: discord.Interaction):
session_text = (
"`!starttourney [region]` - Wipes old tickets, locks general support, and posts the live panel. Use `!starttourney SA` for South America mode.\n"
"`!endtourney` - Closes all active tickets, generates staff stats, posts the Pre-Tourney panel, and unlocks general support.\n"
"`/tourney-panel` - Post the live tourney support button.\n"
"`/pre-tourney-panel` - Post the pre-tourney support button.\n"
"`!lock` / `!unlock` - Manually close or open the general server support channel.\n"
"`/tourney-test-mode` - Toggle 100-ticket limit and 0.1s cooldown for testing."
)
Expand Down
Loading