Geoffrey-Django/GeoffreyApp/docs/source/bot_setup.rst

61 lines
1.6 KiB
ReStructuredText
Raw Normal View History

2019-08-21 17:47:25 +00:00
.. _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 = ""
2019-09-27 21:15:43 +00:00
# Set geoffrey_api_url to the base api url of the GeoffreyApp
2019-08-21 17:47:25 +00:00
# Example:
2019-09-27 21:15:43 +00:00
# https://test.zerohighdef.com/test/GeoffreyApp/api/
geoffrey_api_url = ""
# Set geoffrey_app_url to the base link of the url
# Example:
# If Geoffrey runs at https://24carrotcraft.com/whitelist/geoffrey/home/
# geoffrey_app_url would be https://24carrotcraft.com
geoffrey_app_url = ""
2019-08-21 17:47:25 +00:00
# Set geoffrey_token to the token generated by the GeoffreyApp
geoffrey_token = ""
2019-09-27 21:15:43 +00:00
if __name__ == '__main__':
2019-08-21 17:47:25 +00:00
print("Starting bot and connecting to {}".format(geoffrey_base_link))
2019-09-27 21:15:43 +00:00
bot.start_bot(discord_token=discord_token,
geoffrey_api_url=geoffrey_api_url,
geoffrey_api_token=geoffrey_token,
geoffrey_app_url=geoffrey_app_url)