-
Notifications
You must be signed in to change notification settings - Fork 1
How to set up TempleBot for the first time
Greetings!
This page is to guide you with setting up TempleBot.
Step 1) Install Python3.
Specifically, install Python 3.6, which can be found here: https://www.python.org/downloads/release/python-360/
Step 2) Install BeautifulSoup
BeautifulSoup is a python package used in this code to quickly extract the pawn string from the sim results. It is found here: https://www.crummy.com/software/BeautifulSoup/#Download
Step 3) Download discord.py
TempleBot uses the discord.py wrapper to communicate with discord. It is avaiable here: https://github.com/Rapptz/discord.py Install instructions are available on the readme on that git repo.
Step 4) Get a name for your bot. This is where it gets easy.
Go here: https://discordapp.com/developers/applications
And click on new app
Name it, add an image if wanted.
Convert it to a bot user
Grab the app bot user token (seen in green here), save this in a notepad for later.
Add the bot to your server (you will need admin to any server you are trying to add a bot to). Make sure to copy the yellow block from the above screenshot to the below URL where YELLOWBLOCKFROMABOVEGOESHER is. https://discordapp.com/oauth2/authorize?client_id=YELLOWBLOCKFROMABOVEGOESHERE&scope=bot&permissions=0
The following screen will show up. Select the server you wish to add the bot to, and click authorize.
Step 5) Register for a blizzard API account
Register an application. I named the app my bot name, and the website was the discord page that it operates on. I left the register callback empty
Make note of the key, if you forgot to copy it when it came up on the screen it can be accessed at https://dev.battle.net/apps/mykeys
Make sure to copy it off (what is where the blue is), in the same notepad (different line) as the discord yellow line.
Step 6) Make a perma invite for your bot to join your discord You will want to make note of everything past discord.gg/ (so ex: https://discord.gg/abc123, you will want abc123)
Step 7) Download simcraft, and place the executable somewhere easy to remember Download here: http://www.simulationcraft.org/download.html
Step 8) Edit the config.json file Grey is the path to simcraft (where you put it on your system). This will also be where the results are stored. Blue is the API key from blizzard (as noted above, you should have saved it). Green is the discord token for the bot (also as noted above, should have been saved off). Yellow is the server you wish to add the bot to. If it's multiple servers, it will look like ["abc123","def456"]. Just one server should be ["abc123"]
Step 9) Time to run it! In the command line, go to where code for TempleBot is located and type python3 botrun.py








