-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
47 lines (36 loc) · 1.08 KB
/
setup.sh
File metadata and controls
47 lines (36 loc) · 1.08 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
#!/bin/bash
# Discord Transcript Bot - Setup & Launcher (Unix)
set -e
echo "🔧 Setting up Discord Transcript Bot..."
# Check Python version
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 not found. Please install Python 3.10 or higher."
exit 1
fi
# Create virtual environment
if [ ! -d "venv" ]; then
echo "📦 Creating virtual environment..."
python3 -m venv venv
fi
# Activate venv
source venv/bin/activate
# Upgrade pip
pip install --upgrade pip
# Install requirements
echo "📥 Installing dependencies..."
pip install -r requirements.txt
# Setup .env if not exists
if [ ! -f ".env" ]; then
echo "⚙️ Creating .env file from example..."
cp .env.example .env
echo "⚠️ Please edit .env with your DISCORD_TOKEN and SERVER_ID before running."
echo " You can edit now with: nano .env"
read -p " Press Enter to continue after editing, or Ctrl+C to abort..."
fi
# Create assets directory for local badge icons
mkdir -p assets
# Create transcripts directory
mkdir -p transcripts
# Run the bot
echo "🚀 Starting bot..."
python3 main.py