trivia bot for Outpost 13
This assumes no development or shell experience. Use your own way if you have opinions and preferences.
-
Follow this link to Install Atom or skip and use the editor of your choice
-
Join GitHub
Windows: Install and Open Git Bash, press enter
after copy-pasting each of the following commands:
Install git (and Xcode if on MacOs)
git --version
(MacOS: Say yes to Xcode popup) This should give you a version number if git is installed, otherwise google how to install git.
MacOS only: Install Homebrew
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
Install Python
- MacOS:
brew install python
- Windows:
- use the full install
- Be sure to check "Add Python 3.X to Path"
- Be sure to remove the max_path limitation before completing the install.
Install Pandas
- MacOS:
pip3 install pandas
- Windows:
py -m pip install pandas
atom ~/.profile
- copy/paste this:
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
- save and close atom.
atom ~/.zshrc
- copy/paste this:
alias python=/usr/local/bin/python3 alias Python=/usr/local/bin/python3
- save and close atom.
source ~/.zshrc && source ~/.profile
mkdir TwitchBots
cd TwitchBots
git clone git@github.com:Coding-Koans/Trivvy.git
- Give yourself a high five you're installed!
cd TwitchBots
git pull
- MacOS in terminal:
python -m unittest discover
- Windows in Powershell:
py -m unittest discover
cd TwitchBots/Trivvy
- macOS:
python Trivvy.py --dry-run
- Windows Powershell:
py Trivvy.py --dry-run
-
cd TwitchBots/Trivvy
-
cp config.example.txt config.txt
-
atom config.txt
- modify these configuration settings so it can log on
[Admin Settings] admins = <A_TWITCH_ACCOUNT_USERNAME_WHO_WILL_CONTROL_THE_BOT>(can do multiple admins as a comma-separated list with no spaces) [Bot Settings] host = irc.twitch.tv port = 6667 nick = <A_TWITCH_ACCOUNT_USERNAME_THE_BOT_WILL_USE> pass = oauth:1awesomerandompassofthislength chan = <THE_CHANNEL_THE_BOT_WILL_RUN_ON>
- Save via
<CMND> s
- Also Note: you need to be logged in to twitch under the bot's name to get a pass.
- Also Also Note: You can get that pass (oauth token) from here.
- Also Also Also Note: usernames must be be spelled correctly!
- Alos Also Alos Also Note: Atom doesn't auto-save by default - Make sure to save via
<CMND> s
- Finally Note: oauth passes expire. You'll need a new one from time to time.
-
MacoOS in terminal:
python Trivvy.py --go-live
-
Windows in Powershell:
py Trivvy.py --go-live
(Git Bash doesn't show print statements in real-time) -
You should see the terminal giving you info on what the bot sees from chat, and you should also see a logged-in message in chat from the bot.
!go
- starts trivia!stop
- kills the bot's connection to twitch, and pauses trivia
- in the terminal, type
<CTRL> c <CTRL> c
You will see a bunch of stack traces. That's normal for now.