Skip to content

Add cyberpunk terminal UI theme to all Discord bot embeds#13

Open
Copilot wants to merge 4 commits intomainfrom
copilot/add-cyberpunk-terminal-theme
Open

Add cyberpunk terminal UI theme to all Discord bot embeds#13
Copilot wants to merge 4 commits intomainfrom
copilot/add-cyberpunk-terminal-theme

Conversation

Copy link
Contributor

Copilot AI commented Jan 8, 2026

Transform bot responses with consistent cyberpunk + terminal aesthetics using ANSI color codes and ASCII art while maintaining existing function signatures.

Changes

New Theme Helpers (after line 106)

  • make_cyberpunk_header() - ASCII box headers with optional subtitle
  • make_status_indicator() - Color-coded badges: [SAFE] [ERROR] [CAUTION] etc.
  • make_progress_bar() - Visual bars: ████████░░░░░░░░ 35%

Enhanced Embed Functions (lines 147-256)

All embed functions redesigned with:

  • ANSI-styled code blocks for terminal appearance
  • ASCII box-drawing characters (╔═╗║╚╝┌─┐│└┘)
  • Color-coded themes (green: safe, red: error, orange: warning, yellow: attention, magenta: processing)
  • Truncation indicators (... or [Content truncated for display]) on all text limits

verdict_embed(): Status badges + structured verdict box + color based on safety level
multi_link_embed(): Cyberpunk header + tree-style instructions
error_embed(): Red alert theme + [ERROR] badge + action prompts
ratelimit_embed(): Cooldown header + visual progress bar (capped at 100%)
summarize_progress_embed(): File info box + step indicators + progress bar
summarize_result_embed(): Completion header + file display + truncation notice

Example

# Before: Simple title with basic color
embed = verdict_embed("https://example.com", "Keep", "Safe link", "@user")
# Title: "📎 Link detected"

# After: Cyberpunk terminal interface
embed = verdict_embed("https://example.com", "Keep", "Safe link", "@user")
# Description contains:
# ```ansi
# [2;36m╔═══════════════════════════════════════╗[0m
# [2;36m║[0m  [1;37m📎 LINK ANALYSIS COMPLETE[0m           [2;36m║[0m
# [2;36m╚═══════════════════════════════════════╝[0m
# ```
# ```ansi
# [1;36m┌─[0m [1;37mAI VERDICT[0m [1;36m────────────────────────────┐[0m
# [1;36m│[0m [1;32m[SAFE][0m [1;37mKeep[0m
# [1;36m│[0m [2;37mReason:[0m [1;37mSafe link[0m
# [1;36m└────────────────────────────────────────┘[0m
# ```

Color Palette: #00FF9C (safe/success), #FF0055 (error/unsafe), #FF6600 (warning/caution), #FFFF00 (attention), #FF00FF (processing), #00D9FF (info)

Original prompt

Add Complete Cyberpunk + Terminal UI Theme to Discord Bot

Overview

Transform all bot responses, embeds, and command outputs with a consistent cyberpunk + terminal aesthetic while maintaining 100% of existing functionality.

Changes Required in main.py

1. Add New Theme Helper Functions (After line 95, after existing embed helpers)

Add these new helper functions for cyberpunk styling:

# ---------------------------------------------------------------------------
# Cyberpunk Theme Helpers
# ---------------------------------------------------------------------------

def make_cyberpunk_header(title: str, subtitle: str = "") -> str:
    """Generate cyberpunk ASCII art header"""
    header = f"""```ansi
[2;36m╔═══════════════════════════════════════════════╗[0m
[2;36m║[0m  [1;37m{title[:40]:^40}[0m  [2;36m║[0m
"""
    if subtitle:
        header += f"[2;36m║[0m  [2;33m{subtitle[:40]:^40}[0m  [2;36m║[0m\n"
    header += "[2;36m╚═══════════════════════════════════════════════╝[0m\n```"
    return header


def make_status_indicator(status: str) -> str:
    """Return colored status badge"""
    badges = {
        "online": "[1;32m[ONLINE][0m",
        "ok": "[1;32m[OK][0m",
        "error": "[1;31m[ERROR][0m",
        "warning": "[1;33m[!][0m",
        "safe": "[1;32m[SAFE][0m",
        "caution": "[1;33m[CAUTION][0m",
        "unsafe": "[1;31m[UNSAFE][0m",
        "processing": "[1;36m[PROCESSING][0m",
    }
    return badges.get(status.lower(), f"[1;37m[{status.upper()}][0m")


def make_progress_bar(percentage: int, width: int = 20) -> str:
    """Create ASCII progress bar"""
    filled = int((percentage / 100) * width)
    bar = "█" * filled + "░" * (width - filled)
    return f"[1;32m{bar}[0m [1;37m{percentage}%[0m"

2. Replace Existing Embed Functions (Lines 96-164)

Replace the current simple embed functions with enhanced cyberpunk versions:

Replace verdict_embed function:

def verdict_embed(link: str, verdict_text: str, reason: str, author_mention: str = "") -> discord.Embed:
    """Enhanced AI verdict with cyberpunk terminal styling"""
    
    # Determine color based on verdict
    if "Keep" in verdict_text or "Safe" in verdict_text:
        color = 0x00FF9C
        status = make_status_indicator("safe")
    elif "Skip" in verdict_text or "Caution" in verdict_text:
        color = 0xFF6600
        status = make_status_indicator("caution")
    elif "Unsafe" in verdict_text:
        color = 0xFF0055
        status = make_status_indicator("unsafe")
    else:
        color = 0x00D9FF
        status = make_status_indicator("processing")
    
    header = """```ansi
[2;36m╔═══════════════════════════════════════╗[0m
[2;36m║[0m  [1;37m📎 LINK ANALYSIS COMPLETE[0m           [2;36m║[0m
[2;36m╚═══════════════════════════════════════╝[0m
```"""
    
    verdict_box = f"""```ansi
[1;36m┌─[0m [1;37mAI VERDICT[0m [1;36m────────────────────────────┐[0m
[1;36m│[0m
[1;36m│[0m {status} [1;37m{verdict_text}[0m
[1;36m│[0m
[1;36m│[0m [2;37mReason:[0m [1;37m{reason[:50]}[0m
[1;36m│[0m
[1;36m└────────────────────────────────────────┘[0m

[2;35m>_[0m [2;37mURL:[0m [2;36m{link[:60]}{'...' if len(link) > 60 else ''}[0m
```"""
    
    footer_text = f"Analyzed for {author_mention}" if author_mention else "Neural analysis complete"
    
    return make_embed(
        title="",
        description=header + verdict_box,
        color=color,
        footer=footer_text,
    )

Replace multi_link_embed function:

def multi_link_embed(count: int) -> discord.Embed:
    """Cyberpunk multi-link selection prompt"""
    header = make_cyberpunk_header("MULTIPLE LINKS DETECTED", f"{count} URLs found")
    
    content = f"""```ansi
[1;36m>_[0m [1;37mSelect the links you want to save[0m
[2;36m├─>[0m [2;37mUse the dropdown menu below[0m
[2;36m├─>[0m [2;37mYou can select multiple links[0m
[2;36m└─>[0m [2;37mIgnore the rest automatically[0m

💡 Tip: Choose only what you need for better organization."""

return make_embed(
    title="",
    description=header + content,
    color=0xFFFF00,
    footer="Batch selection mode active",
)

**Replace `error_embed` function:**
```python
def error_embed(msg: str) -> discord.Embed:
    """Cyberpunk-styled error message with red alert theme"""
    header = """```ansi
[1;31m╔═══════════════════════════════════════╗[0m
[1;31m║[0m  [1;37m⚠️  SYSTEM ERROR DETECTED[0m          [1;31m║[0m
[1;31m╚═══════════════════════════════════════╝[0m
```"""
    
    error_content = f"""```ansi
[2;31m>_[0m [1;31m[ERROR][0m [2;37m{msg[:200]}[0m

🔧 Action Required: Check your input and try again."""

return make_embed(
    title="",
    description=header + error_content,
    color=0xFF0055,
    footer="If this persists, contact an administrator",
)

**Replace `ratelimit_embed` function:**
```python
def ratelimit_embed(wait_s: float) -> discord.Embed:
    """Cooldown timer with visual ...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

@roomote-v0
Copy link

roomote-v0 bot commented Jan 8, 2026

Rooviewer Clock   See task on Roo Cloud

Review sync completed. The PR has addressed 2 of 3 previously flagged issues. One critical issue remains.

  • Progress bar percentage overflow fixed
  • Truncation indicators added to reason text
  • CRITICAL: ANSI escape codes missing escape character prefix
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@Rajrooter Rajrooter marked this pull request as ready for review January 8, 2026 22:00
@qodo-code-review
Copy link

PR Code Suggestions ✨

No code suggestions found for the PR.

@roomote-v0
Copy link

roomote-v0 bot commented Jan 8, 2026

Rooviewer Clock   See task on Roo Cloud

Review completed. Found 3 issues that should be addressed:

  • CRITICAL: ANSI escape codes are missing the escape character prefix (\u001b or \x1b). Without this, all color codes will display as plain text, breaking the entire cyberpunk theme.
  • Progress bar percentage can exceed 100% when wait time exceeds 10 seconds, causing the progress bar to overflow.
  • Inconsistent truncation: reason field truncates at 50 characters without ellipsis indicator, unlike URL truncation.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Copilot AI and others added 2 commits January 8, 2026 22:03
Co-authored-by: Rajrooter <128113526+Rajrooter@users.noreply.github.com>
Co-authored-by: Rajrooter <128113526+Rajrooter@users.noreply.github.com>
Comment on lines +115 to +122
header = f"""```ansi
[2;36m╔═══════════════════════════════════════════════╗[0m
[2;36m║[0m [1;37m{title[:40]:^40}[0m [2;36m║[0m
"""
if subtitle:
header += f"[2;36m║[0m [2;33m{subtitle[:40]:^40}[0m [2;36m║[0m\n"
header += "[2;36m╚═══════════════════════════════════════════════╝[0m\n```"
return header
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ANSI escape codes are missing the escape character prefix. Discord requires proper ANSI escape sequences like \u001b[2;36m or \x1b[2;36m, not [2;36m. Without the escape character, these codes will display as plain text instead of producing colored output, breaking the entire cyberpunk theme. This affects all cyberpunk theme functions (make_cyberpunk_header, make_status_indicator, make_progress_bar, and all embed functions that use them).

Fix it with Roo Code or mention @roomote and request a fix.

main.py Outdated
[1;33m╚═══════════════════════════════════════╝[0m
```"""

cooldown_bar = make_progress_bar(int((wait_s / 10) * 100), 25)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Progress bar percentage can exceed 100% when wait_s > 10 seconds. The calculation int((wait_s / 10) * 100) assumes a maximum wait time of 10 seconds. If wait_s exceeds this (which can happen with rate limiting), the percentage will exceed 100%, causing the progress bar width calculation in make_progress_bar() to overflow (filled would exceed width), breaking the visual display.

Suggested change
cooldown_bar = make_progress_bar(int((wait_s / 10) * 100), 25)
cooldown_bar = make_progress_bar(min(int((wait_s / 10) * 100), 100), 25)

Fix it with Roo Code or mention @roomote and request a fix.

Co-authored-by: Rajrooter <128113526+Rajrooter@users.noreply.github.com>
main.py Outdated
[1;36m│[0m
[1;36m│[0m {status} [1;37m{verdict_text}[0m
[1;36m│[0m
[1;36m│[0m [2;37mReason:[0m [1;37m{reason[:50]}[0m
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent truncation handling: the reason is truncated to 50 characters without an ellipsis indicator, while the URL at line 179 properly includes '...' when truncated. Users may be confused when the reason appears cut off without indication that there's more content.

Suggested change
[1;36m│[0m [2;37mReason:[0m [1;37m{reason[:50]}[0m
[1;36m│[0m [2;37mReason:[0m [1;37m{reason[:50]}{'...' if len(reason) > 50 else ''}[0m

Fix it with Roo Code or mention @roomote and request a fix.

Copilot AI changed the title [WIP] Add complete cyberpunk + terminal UI theme to Discord bot Add cyberpunk terminal UI theme to all Discord bot embeds Jan 8, 2026
Copilot AI requested a review from Rajrooter January 8, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants