Skip to content

Add emojis to all Telegram bot messages and menus#12

Merged
Adialia1 merged 2 commits into
mainfrom
claude/add-telegram-emojis-08vkp
Mar 25, 2026
Merged

Add emojis to all Telegram bot messages and menus#12
Adialia1 merged 2 commits into
mainfrom
claude/add-telegram-emojis-08vkp

Conversation

@Adialia1

Copy link
Copy Markdown
Owner

Summary

  • Added contextual emojis to all menu buttons (sizing, risk, filters, execution, time exits, keywords, conflict strategy, dry run toggle)
  • Enhanced detail lines in position views, trader lists, wallet lists, stats, and trade notifications with relevant emojis
  • Added emojis to help text sections, command lists, tips, and how-it-works bullet points
  • Updated notifier messages (bot started/stopped, trade executed/failed, risk triggers, daily summary, redemptions) with emojis on every detail line

Test plan

  • Verify all Telegram menu buttons render correctly with emojis
  • Check that notification messages (trade executed, trade failed, risk triggers) display properly
  • Test the help command output formatting
  • Verify wallet connection flow messages show emojis correctly
  • Test follow trader flow and confirm emojis appear on detail lines

https://claude.ai/code/session_01WCuqjynVrtHj3DbKWXmhBz

claude added 2 commits March 22, 2026 10:31
…t management

Transform Polybot from single-user CLI to multi-user Telegram bot:
- SQLite database for multi-user storage with encrypted private keys (AES-256-GCM)
- Interactive inline keyboard menus for wallet, settings, trading, and position management
- Per-user bot instances with independent trade monitoring and execution
- Full settings management via Telegram (slippage, risk, filters, sizing, keywords)
- Wallet connection flow with support for EOA, Email, and Browser wallet types
- Follow/unfollow traders with per-trader allocation percentages
- Position viewing, individual sell, and sell-all functionality
- Run with: npm run telegram

https://claude.ai/code/session_012j2JT3oXieZBydkazQxYSY
Enhance the visual appearance of all Telegram messages by adding
contextual emojis throughout menus, notifications, and status messages
including settings buttons, position details, trade notifications,
stats labels, follow/wallet flows, and command help text.

https://claude.ai/code/session_01WCuqjynVrtHj3DbKWXmhBz
import { TradeMonitor } from './tradeMonitor.js';
import { PositionSizer } from './positionSizer.js';
import { OrderQueue, QueuedOrder } from './orderQueue.js';
import { RiskManager } from './riskManager.js';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import RiskManager.

Copilot Autofix

AI 4 months ago

In general, unused imports should be removed to keep the codebase clean and avoid confusion. If the module’s side effects are needed but the binding is not, the import should be converted to a side-effect-only import (import './riskManager.js';).

For this specific case, the best minimal fix that does not change existing functionality is to delete the unused RiskManager named import from src/services/userBotManager.ts. Since the rest of the file (in the provided snippet) does not reference RiskManager, and other imports already provide the needed types and classes, removing this one line will not alter runtime behavior or type-checking, it will only remove the dead import. No new methods, fields, or definitions are necessary, and no other lines in this file need adjusting.

Suggested changeset 1
src/services/userBotManager.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/services/userBotManager.ts b/src/services/userBotManager.ts
--- a/src/services/userBotManager.ts
+++ b/src/services/userBotManager.ts
@@ -1,7 +1,6 @@
 import { TradeMonitor } from './tradeMonitor.js';
 import { PositionSizer } from './positionSizer.js';
 import { OrderQueue, QueuedOrder } from './orderQueue.js';
-import { RiskManager } from './riskManager.js';
 import { Trader, TradeResult } from './trader.js';
 import { ClobApiClient } from '../api/clobApi.js';
 import { isMarketBlacklisted, isMarketWhitelisted } from './tradeFilter.js';
EOF
@@ -1,7 +1,6 @@
import { TradeMonitor } from './tradeMonitor.js';
import { PositionSizer } from './positionSizer.js';
import { OrderQueue, QueuedOrder } from './orderQueue.js';
import { RiskManager } from './riskManager.js';
import { Trader, TradeResult } from './trader.js';
import { ClobApiClient } from '../api/clobApi.js';
import { isMarketBlacklisted, isMarketWhitelisted } from './tradeFilter.js';
Copilot is powered by AI and may make mistakes. Always verify output.
import { OrderQueue, QueuedOrder } from './orderQueue.js';
import { RiskManager } from './riskManager.js';
import { Trader, TradeResult } from './trader.js';
import { ClobApiClient } from '../api/clobApi.js';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import ClobApiClient.

Copilot Autofix

AI 4 months ago

In general, unused imports should be removed to keep the codebase clean and avoid misleading future readers about dependencies. Since ClobApiClient is not referenced anywhere in src/services/userBotManager.ts, the safest and most direct fix that preserves behavior is to delete the unused import line.

Concretely, in src/services/userBotManager.ts, remove line 6:

import { ClobApiClient } from '../api/clobApi.js';

No other changes are needed: we do not need to add any new imports, change the constructor, or modify any methods, because nothing in this file relies on ClobApiClient at present.

Suggested changeset 1
src/services/userBotManager.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/services/userBotManager.ts b/src/services/userBotManager.ts
--- a/src/services/userBotManager.ts
+++ b/src/services/userBotManager.ts
@@ -3,7 +3,6 @@
 import { OrderQueue, QueuedOrder } from './orderQueue.js';
 import { RiskManager } from './riskManager.js';
 import { Trader, TradeResult } from './trader.js';
-import { ClobApiClient } from '../api/clobApi.js';
 import { isMarketBlacklisted, isMarketWhitelisted } from './tradeFilter.js';
 import { UserDb, UserSettings } from '../db/userDb.js';
 import { TradeSignal, WalletConfig, CopyConfig } from '../types/index.js';
EOF
@@ -3,7 +3,6 @@
import { OrderQueue, QueuedOrder } from './orderQueue.js';
import { RiskManager } from './riskManager.js';
import { Trader, TradeResult } from './trader.js';
import { ClobApiClient } from '../api/clobApi.js';
import { isMarketBlacklisted, isMarketWhitelisted } from './tradeFilter.js';
import { UserDb, UserSettings } from '../db/userDb.js';
import { TradeSignal, WalletConfig, CopyConfig } from '../types/index.js';
Copilot is powered by AI and may make mistakes. Always verify output.
import { ClobApiClient } from '../api/clobApi.js';
import { isMarketBlacklisted, isMarketWhitelisted } from './tradeFilter.js';
import { UserDb, UserSettings } from '../db/userDb.js';
import { TradeSignal, WalletConfig, CopyConfig } from '../types/index.js';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import CopyConfig.

Copilot Autofix

AI 4 months ago

In general, unused imports should be removed from the file where they are declared. This improves readability, avoids misleading future maintainers into thinking a type or value is relevant there, and can slightly improve tooling performance.

For this specific case in src/services/userBotManager.ts, the best fix is to keep the import of actually used types (TradeSignal, WalletConfig) and remove only CopyConfig from the destructuring import. No other code changes are necessary, and there is no functional impact because removing an unused import does not affect runtime behavior.

Concretely:

  • Edit src/services/userBotManager.ts.
  • Locate the line:
    import { TradeSignal, WalletConfig, CopyConfig } from '../types/index.js';
  • Replace it with:
    import { TradeSignal, WalletConfig } from '../types/index.js';

No additional methods, imports, or definitions are needed.

Suggested changeset 1
src/services/userBotManager.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/services/userBotManager.ts b/src/services/userBotManager.ts
--- a/src/services/userBotManager.ts
+++ b/src/services/userBotManager.ts
@@ -6,7 +6,7 @@
 import { ClobApiClient } from '../api/clobApi.js';
 import { isMarketBlacklisted, isMarketWhitelisted } from './tradeFilter.js';
 import { UserDb, UserSettings } from '../db/userDb.js';
-import { TradeSignal, WalletConfig, CopyConfig } from '../types/index.js';
+import { TradeSignal, WalletConfig } from '../types/index.js';
 import TelegramBot from 'node-telegram-bot-api';
 
 export interface UserBotInstance {
EOF
@@ -6,7 +6,7 @@
import { ClobApiClient } from '../api/clobApi.js';
import { isMarketBlacklisted, isMarketWhitelisted } from './tradeFilter.js';
import { UserDb, UserSettings } from '../db/userDb.js';
import { TradeSignal, WalletConfig, CopyConfig } from '../types/index.js';
import { TradeSignal, WalletConfig } from '../types/index.js';
import TelegramBot from 'node-telegram-bot-api';

export interface UserBotInstance {
Copilot is powered by AI and may make mistakes. Always verify output.
@@ -0,0 +1,197 @@
import TelegramBot from 'node-telegram-bot-api';
import { UserDb } from '../../db/userDb.js';
import { positionsMenu, confirmMenu, backButton } from '../menus.js';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import backButton.

Copilot Autofix

AI 4 months ago

To fix an unused import, remove it from the import list so that only actually used symbols are imported. This preserves functionality while improving readability and avoiding linter/static-analysis noise.

Concretely, in src/telegram/handlers/positions.ts, on the import line from ../menus.js, remove backButton from the destructuring import while keeping positionsMenu and confirmMenu unchanged. No additional imports, methods, or definitions are required; we are only narrowing the existing import.

Suggested changeset 1
src/telegram/handlers/positions.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/telegram/handlers/positions.ts b/src/telegram/handlers/positions.ts
--- a/src/telegram/handlers/positions.ts
+++ b/src/telegram/handlers/positions.ts
@@ -1,6 +1,6 @@
 import TelegramBot from 'node-telegram-bot-api';
 import { UserDb } from '../../db/userDb.js';
-import { positionsMenu, confirmMenu, backButton } from '../menus.js';
+import { positionsMenu, confirmMenu } from '../menus.js';
 import type { UserBotManager } from '../../services/userBotManager.js';
 
 export function registerPositionsHandler(bot: TelegramBot, db: UserDb, getBotManager: () => UserBotManager): void {
EOF
@@ -1,6 +1,6 @@
import TelegramBot from 'node-telegram-bot-api';
import { UserDb } from '../../db/userDb.js';
import { positionsMenu, confirmMenu, backButton } from '../menus.js';
import { positionsMenu, confirmMenu } from '../menus.js';
import type { UserBotManager } from '../../services/userBotManager.js';

export function registerPositionsHandler(bot: TelegramBot, db: UserDb, getBotManager: () => UserBotManager): void {
Copilot is powered by AI and may make mistakes. Always verify output.
@@ -0,0 +1,68 @@
import TelegramBot from 'node-telegram-bot-api';
import { UserDb } from '../../db/userDb.js';
import { backButton } from '../menus.js';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import backButton.

Copilot Autofix

AI 4 months ago

To fix the problem, remove the unused import of backButton from ../menus.js. This eliminates dead code, avoids confusion, and has no effect on runtime behavior since backButton is never referenced.

Concretely, in src/telegram/handlers/stats.ts, delete line 3 that imports backButton. No other code changes are needed, and no additional methods, imports, or definitions are required.

Suggested changeset 1
src/telegram/handlers/stats.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/telegram/handlers/stats.ts b/src/telegram/handlers/stats.ts
--- a/src/telegram/handlers/stats.ts
+++ b/src/telegram/handlers/stats.ts
@@ -1,6 +1,5 @@
 import TelegramBot from 'node-telegram-bot-api';
 import { UserDb } from '../../db/userDb.js';
-import { backButton } from '../menus.js';
 
 export function registerStatsHandler(bot: TelegramBot, db: UserDb): void {
 
EOF
@@ -1,6 +1,5 @@
import TelegramBot from 'node-telegram-bot-api';
import { UserDb } from '../../db/userDb.js';
import { backButton } from '../menus.js';

export function registerStatsHandler(bot: TelegramBot, db: UserDb): void {

Copilot is powered by AI and may make mistakes. Always verify output.
@@ -0,0 +1,96 @@
import TelegramBot from 'node-telegram-bot-api';
import { UserDb } from '../../db/userDb.js';
import { tradingMenu, backButton } from '../menus.js';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import backButton.

Copilot Autofix

AI 4 months ago

To fix the problem, remove the unused backButton named import from the import statement so only the actually used tradingMenu symbol is imported. This eliminates the unused import without changing any existing functionality.

Concretely, in src/telegram/handlers/trading.ts, on the import line currently reading import { tradingMenu, backButton } from '../menus.js';, remove backButton and its trailing comma/space. The resulting line should be import { tradingMenu } from '../menus.js';. No other code changes are needed, and no additional imports or definitions are required.

Suggested changeset 1
src/telegram/handlers/trading.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/telegram/handlers/trading.ts b/src/telegram/handlers/trading.ts
--- a/src/telegram/handlers/trading.ts
+++ b/src/telegram/handlers/trading.ts
@@ -1,6 +1,6 @@
 import TelegramBot from 'node-telegram-bot-api';
 import { UserDb } from '../../db/userDb.js';
-import { tradingMenu, backButton } from '../menus.js';
+import { tradingMenu } from '../menus.js';
 import type { UserBotManager } from '../../services/userBotManager.js';
 
 export function registerTradingHandler(bot: TelegramBot, db: UserDb, getBotManager: () => UserBotManager): void {
EOF
@@ -1,6 +1,6 @@
import TelegramBot from 'node-telegram-bot-api';
import { UserDb } from '../../db/userDb.js';
import { tradingMenu, backButton } from '../menus.js';
import { tradingMenu } from '../menus.js';
import type { UserBotManager } from '../../services/userBotManager.js';

export function registerTradingHandler(bot: TelegramBot, db: UserDb, getBotManager: () => UserBotManager): void {
Copilot is powered by AI and may make mistakes. Always verify output.
@Adialia1
Adialia1 merged commit da51304 into main Mar 25, 2026
7 checks passed
@Adialia1
Adialia1 deleted the claude/add-telegram-emojis-08vkp branch March 25, 2026 22:00
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.

3 participants