Updated bot docs for service file and startup script
parent
38df420552
commit
cbd7c02117
|
@ -24,37 +24,14 @@ Installing GeoffreyBot From Source
|
||||||
|
|
||||||
pip3 install -e .
|
pip3 install -e .
|
||||||
|
|
||||||
Create Startup File
|
Create A Startup File
|
||||||
*******************
|
*********************
|
||||||
Since GeoffreyBot is installed as a module, a small bootstrap program must be used to launch it. The bootstrap program
|
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
|
must pass the discord token, the Geoffrey API token and the base url that the GeoffreyApp is running at. An example
|
||||||
example.
|
can be found `here <https://git.etztech.xyz/ZeroHD/Geoffrey-DiscordBot/src/branch/master/geoffrey_bot_start.py>`__
|
||||||
|
|
||||||
.. code-block:: python
|
Create A Service File
|
||||||
|
*********************
|
||||||
from GeoffreyBot import bot
|
In order to start and restart Geoffrey Bot automatically, a Systemd service can be created. An example service file can
|
||||||
|
be found `here <https://git.etztech.xyz/ZeroHD/Geoffrey-DiscordBot/src/branch/master/geoffrey_bot.service>`__
|
||||||
# Set discord_token to the token for the Discord bot
|
|
||||||
discord_token = ""
|
|
||||||
|
|
||||||
# Set geoffrey_api_url to the base api url of the GeoffreyApp
|
|
||||||
# Example:
|
|
||||||
# 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 = ""
|
|
||||||
|
|
||||||
# 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_api_url=geoffrey_api_url,
|
|
||||||
geoffrey_api_token=geoffrey_token,
|
|
||||||
geoffrey_app_url=geoffrey_app_url)
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue