Added bot setup to the docs

doc_update
Joey Hines 2019-08-21 12:47:25 -05:00
parent 00b5fb3de9
commit 57f3d2fa83
2 changed files with 53 additions and 1 deletions

View File

@ -0,0 +1,51 @@
.. _bot_setup:
******************
Geoffrey Bot Setup
******************
Setup
#####
Installing GeoffreyBot From Source
**********************************
1. Download GeoffreyBot by cloning it
::
git clone https://git.etztech.xyz/ZeroHD/Geoffrey-DiscordBot.git GeoffreyBot
2. Change directories into `GeoffreyBot`
::
cd GeoffreyBot/
3. Install GeoffreyBot as a module
::
pip3 install -e .
Create Startup File
*******************
Since GeoffreyBot is installed as a module, a small bootstrap program must be used to launch it. The bootstrap program
must pass the discord token, the Geoffrey API token and the base url that the GeoffreyApp is running at. Below is an
example.
.. code-block:: python
from GeoffreyBot import bot
# Set discord_token to the token for the Discord bot
discord_token = ""
# Set geoffrey_api_link to the base url of the GeoffreyApp
# Example:
# If the Geoffrey Command API was at https://test.zerohighdef.com/GeoffreyApp/api/
# The base link would be https://test.zerohighdef.com
geoffrey_base_link = ""
# Set geoffrey_token to the token generated by the GeoffreyApp
geoffrey_token = ""
if name == 'main':
print("Starting bot and connecting to {}".format(geoffrey_base_link))
bot.start_bot(discord_token=discord_token, geoffrey_base_url=geoffrey_base_link, geoffrey_api_token=geoffrey_token)

View File

@ -14,4 +14,5 @@ bases, shops, items for sale, tunnels, towns, public farms and more!
django_settings
commands
models
bot_quickstart.rst
bot_setup
bot_quickstart