-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·73 lines (63 loc) · 1.99 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·73 lines (63 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
# Axiom Trade Telegram Bot Setup Script
# This script helps you set up the Telegram bot with all required dependencies
echo "🤖 Axiom Trade Telegram Bot Setup"
echo "=================================="
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is not installed. Please install Python 3.7+ first."
exit 1
fi
echo "✅ Python 3 found: $(python3 --version)"
# Check if pip is installed
if ! command -v pip3 &> /dev/null; then
echo "❌ pip3 is not installed. Please install pip first."
exit 1
fi
echo "✅ pip3 found: $(pip3 --version)"
# Install required packages
echo ""
echo "📦 Installing required packages..."
pip3 install python-telegram-bot python-dotenv
if [ $? -eq 0 ]; then
echo "✅ Packages installed successfully"
else
echo "❌ Failed to install packages"
exit 1
fi
# Check if .env file exists
if [ ! -f ".env" ]; then
echo ""
echo "📄 Creating .env file from template..."
if [ -f ".env.template" ]; then
cp .env.template .env
echo "✅ .env file created from template"
echo "⚠️ Please edit .env file with your actual values:"
echo " - TELEGRAM_BOT_TOKEN (get from @BotFather)"
echo " - TELEGRAM_CHAT_ID (your chat/channel ID)"
echo " - auth-access-token (from Axiom Trade)"
echo " - auth-refresh-token (from Axiom Trade)"
else
echo "❌ .env.template not found"
exit 1
fi
else
echo "✅ .env file already exists"
fi
echo ""
echo "🧪 Testing configuration..."
python3 test_telegram_setup.py
echo ""
echo "📋 Setup Summary:"
echo "=================="
echo "✅ Python packages installed"
echo "✅ Environment file ready"
echo ""
echo "📝 Next Steps:"
echo "1. Edit .env file with your actual credentials"
echo "2. Run: python3 test_telegram_setup.py"
echo "3. If tests pass, run: python3 telegram_token_bot.py"
echo ""
echo "📖 For detailed instructions, see README.md"
echo ""
echo "🎉 Setup complete!"