Fix bot instantiation scope and simplify non-help embeds#18
Open
Fix bot instantiation scope and simplify non-help embeds#18
Conversation
PR Code Suggestions ✨No code suggestions found for the PR. |
Co-authored-by: Rajrooter <128113526+Rajrooter@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix bot instance and simplify embed functions
Fix bot instantiation scope and simplify non-help embeds
Jan 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bot instance was created inside
setup_hook()method causingNameErrorwhen module-level decorators attempted to reference it. All embeds used complex ANSI cyberpunk styling making error messages and verdicts hard to read.Changes
Bot instantiation
bot = MyBot(...)from insidesetup_hook()to module level after class definitionEmbed simplification
make_cyberpunk_header,make_status_indicator,make_progress_bar)make_cyberpunk_help_embed()andmake_compact_help_embed()Before:
🔧 Action Required: Check your input and try again."""
return make_embed(title="", description=header + error_content, ...)
Impact
Original prompt
🔧 Fix Bot Instance + Simplify Embeds (Keep Cyberpunk Only For Help)
Critical Issues
bot = MyBot(...)causingNameError: name 'bot' is not definedRequired Changes
1. Add Missing Bot Instance (CRITICAL)
After line 761 (
logger.info(f"✅ Total commands synced: {len(synced_commands)}")), add:2. Keep Cyberpunk Theme ONLY For Help Command
KEEP these functions as-is:
make_cyberpunk_help_embed()(line 310)make_compact_help_embed()(line 425)show_help()command (line 1527)command_info()command (line 1536)3. Simplify All Other Embed Functions
Replace the complex ANSI-styled functions with simple Discord embeds:
Replace
verdict_embed()(line 150):Replace
multi_link_embed()(line 195):Replace
summarize_progress_embed()(line 216):Replace
summarize_result_embed()(line 242):Replace
error_embed()(line 262):Replace
ratelimit_embed()(line 284):4. Remove Unused Helper Functions
Delete these functions (no longer needed):
make_cyberpunk_header()(line 90)make_status_indicator()(line 102)make_progress_bar()(line 117)5. Update make_embed()
Keep it simple (line 128):
Expected Result
After these changes:
NameError/helpcommand shows beautiful cyberpunk themeTesting
1...
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.