P4Discord is a Discord app that allows you to manage your locally-hosted Perforce server from discord! Using James Ives Perforce Commit Discord Bot, and my own Discord-Bot-Template, I created this bot as a wrapper for p4v, p4d, and p4broker so that you can manage perforce without having to connect to your server with SSH or Remote Desktop software.
- On your server machine, clone this repo onto your C: drive (
/p4 checkdrive
checks if your storage drive is connected or not, so you should run this bot off an internal drive to prevent failure) - Use
pip install -r requirements.txt
to install necessary packages (Reliably tested with Python 3.7.2, anything past that is untested and may have dependency issues!) - Configure
TOKEN
,webhookURL
, andstartup.bat
with necessary values (Bot Token, Webhook URL, filepath). WIN + R, enter "shell:startup", and placestartup.bat
in startup folder. - Then use
python bot.py
. A second window should open, displaying the webhook.py console, and your main window should display a live chat log. - Highly recommend going into your server system's BiOS settings and enabling Power On After Power Loss to automatically reboot in-case of power outages!
/p4 start
to start Helix Core Server + Helix Core Broker (superuser and admin users only)/p4 stop
to stop Helix Core Server (superuser and admin users only)/p4 status
to check if server is running/p4 checkdrive
to check if server storage drive is connected/p4 presence NAME
to set bot's game status on discord/p4 users
to get list of members in server/p4 admins
to check list of admin users (superuser only)/p4 promote USERNAME
to promote users to admin (superuser only)/p4 demote USERNAME
to demote admin to user (superuser only)- Set
webhookURL
in webhook.py to send notifications everytime a change is pushed - Put
startup.bat
in Startup folder to automatically start server on system reboot (failsafe)
- James Ives' perforce-commit-discord-bot
- Python 3.7.2
- GitHub
- Cisc0-gif - Main Contributor/Author: fergo310@yahoo.com
This project is licensed under the GPLv3 License - see LICENSE file for details
All credits are given to the authors and contributors to tools used in this software