Remove grey background from price change text
Remove ANSI code block formatting from price change field to eliminate grey background box. Price change now displays as plain text while maintaining color indication via embed border. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
7
bot.py
7
bot.py
@@ -138,19 +138,16 @@ class StockBot(commands.Bot):
|
|||||||
if change_dollar > 0:
|
if change_dollar > 0:
|
||||||
color = discord.Color.green()
|
color = discord.Color.green()
|
||||||
change_emoji = "📈"
|
change_emoji = "📈"
|
||||||
ansi_color = "\u001b[0;32m" # Green
|
|
||||||
elif change_dollar < 0:
|
elif change_dollar < 0:
|
||||||
color = discord.Color.red()
|
color = discord.Color.red()
|
||||||
change_emoji = "📉"
|
change_emoji = "📉"
|
||||||
ansi_color = "\u001b[0;31m" # Red
|
|
||||||
else:
|
else:
|
||||||
color = discord.Color.blue()
|
color = discord.Color.blue()
|
||||||
change_emoji = "➡️"
|
change_emoji = "➡️"
|
||||||
ansi_color = "\u001b[0;34m" # Blue
|
|
||||||
|
|
||||||
# Format change string with ANSI color
|
# Format change string
|
||||||
change_sign = "+" if change_dollar >= 0 else ""
|
change_sign = "+" if change_dollar >= 0 else ""
|
||||||
change_str = f"```ansi\n{ansi_color}{change_sign}${change_dollar} ({change_sign}{change_percent}%)\u001b[0m\n```"
|
change_str = f"{change_sign}${change_dollar} ({change_sign}{change_percent}%)"
|
||||||
|
|
||||||
# Custom title for PYPL ticker
|
# Custom title for PYPL ticker
|
||||||
if ticker == "PYPL":
|
if ticker == "PYPL":
|
||||||
|
|||||||
Reference in New Issue
Block a user