-
Notifications
You must be signed in to change notification settings - Fork 10
How to run thatskybot on Discord
https://discordapp.com/channels/621746949485232154/621746950458572801/661640455657619486
- Go to https://github.com/e-a-h/That-Sky-Bot/ and clone it to your computer. Check that you have the requirements. Then
git checkout dev-music
- Go to https://discordapp.com/developers/applications/ and create a new application with a bot.
- Take note of where to copy the "token" for your bot (client secret).
- Make a test server on Discord with a
#logs
channel. - Go to your Discord settings > Appearance > turn on Developer Mode.
- Right click and copy ID of the
#logs
channel, and store it somewhere.
Then invite it to your server: https://github.com/sky-music/sky-python-music-sheet-maker/wiki/Invite-a-Discord-bot-to-your-server
- I used https://mariadb.com/ for the database (I have a Mac https://mariadb.com/kb/en/installing-mariadb-on-macos-using-homebrew/)
In a terminal, run this to start the server:
mysql.server start
The first time following these steps, create an empty database with a user:
sudo mysql -u root
CREATE database skybot;
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON skybot.* TO 'username'@localhost;
FLUSH PRIVILEGES
Replace username and password, keeping the single quotes. (Username and password are used later in step 4)
Warning
⚠️ : The password will be written in plain text, so it is advised to use a password that you don’t use anywhere else.
- Make a new file in That-Sky-Bot called
config.json
, and paste the contents fromconfig.example.json
Edit the corresponding parts of config.json
:
- token is the Discord token from step 2
- DATABASE_USER and DATABASE_PASS are your username and password from step 3
- DATABASE_HOST is
localhost
, DATABASE_NAME isskybot
, DATABASE_PORT depends (I have 3306 for MariaDB) - log_channel is the ID from step 2
- make sure that “Music” is in the list of cogs
- Remove the existing python-music-sheet-maker folder to add our python music sheet maker as a submodule:
rm -rf sky-python-music-sheet-maker
git rm sky-python-music-sheet-maker
git submodule add https://github.com/sky-music/sky-python-music-sheet-maker.git
- Run this to start the database connection, each time before starting the bot. (If you're following these steps for the first time, you may already have it up.)
mysql.server start
Then run sky.py
. Ctrl + C to stop running the bot
Change directory to where you saved the bot:
cd YOUR_FILEPATH/That-Sky-Bot
Then go to the sky-python-music-sheet-maker submodule, and git checkout
the dev branch (or any other branch):
cd sky-python-music-sheet-maker
git checkout dev