Skip to content

Commit 0c29a0a

Browse files
committed
Added start-discord-bot
1 parent 456691b commit 0c29a0a

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

start-discord-bot.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
3+
if [[ $# -eq 0 ]] ; then
4+
echo 'Must provide path to discord-bot. For example: ./start-discord-bot.sh ../discord-bot'
5+
exit 1
6+
fi
7+
8+
cd $1
9+
WD=`pwd`
10+
cd -
11+
12+
if [ ! -f "./discord-bot/docker-compose.override.yml" ]; then
13+
echo "Discord Bot Token from https://discord.com/developers/applications:"
14+
read DISCORD
15+
echo "Public Server ID (Turn on Discord Developer Mode and right click to get ID):"
16+
read PUBLIC_SERVER
17+
echo "Committee Server ID:"
18+
read COMMITTEE_SERVER
19+
echo "Public Announcements Channel ID:"
20+
read PUBLIC_CHANNEL
21+
echo "Public General Channel ID:"
22+
read PUBLIC_GENERAL
23+
echo "Private Events Channel ID:"
24+
read COMMITTEE_CHANNEL
25+
echo "Welcome Messages (comma delimited, username as %s):"
26+
read WELCOME_MESSAGES
27+
echo "Sendgrid Token (optional, press enter if none)"
28+
read SENDGRID
29+
30+
echo "version: \"3.7\"
31+
services:
32+
discord-bot:
33+
environment:
34+
- DISCORD_TOKEN=${DISCORD}
35+
- DISCORD_PUBLIC_SERVER=${PUBLIC_SERVER}
36+
- DISCORD_PUBLIC_CHANNEL=${PUBLIC_CHANNEL}
37+
- DISCORD_PUBLIC_GENERAL=${PUBLIC_GENERAL}
38+
- DISCORD_COMMITTEE_SERVER=${COMMITTEE_SERVER}
39+
- DISCORD_COMMITTEE_CHANNEL=${COMMITTEE_CHANNEL}
40+
- DISCORD_PUBLIC_WELCOME=${WELCOME_MESSAGES}
41+
- DISCORD_PUBLIC_CORONA=${PUBLIC_GENERAL}
42+
- SENDGRID_TOKEN=${SENDGRID}
43+
volumes:
44+
- ${WD}:/bot
45+
" > ./discord-bot/docker-compose.override.yml
46+
fi
47+
48+
bash -c "./dev-env up discord-bot"

0 commit comments

Comments
 (0)