Skip to content

kiweezi/halogen-pay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

made-with-python Build-Status

Halogen Pay

Automated payment for the Halogen game server.

Index

Requirements

Essential

Setup

  1. Make sure your Discord bot has the following permissions in your server and channel:
    • Change Nickname
    • View Channels
    • Send Messages
    • Embed Links
    • Read Message History
    • Mention Everyone
    • Add Reactions
  2. Clone/Download the /script folder to your prefered location
  3. Install dependancies with pip
    • pip install -r requirements.txt or python -m pip install -r requirements.txt
    • If running windows, use win-requirements.txt instead.
    • On some Linux/Mac systems, you may need to use python3 and pip3 instead of python and pip, respectively.
  4. Configure the cfg.json file
  5. Add the bot.py script as a systemd service to control it easily. The service file should look like the below, replacing the filepaths and usernames:
# Put me in /etc/systemd/system/

[Unit]
Description=Halogen Pay Bot
After=multi-user.target

[Service]
User=<username>
WorkingDirectory=/home/<username>/halogen-pay/
ExecStart=/usr/bin/python3 /home/<username>/halogen-pay/scripts/bot.py

[Install]
WantedBy=multi-user.target

Configure

Change the behaviour of the program with the cfg.json file. First, configure the template.json file and then rename it to cfg.json when ready to use.

gsheets

  • spreadsheet
    • value: name
    • description: Name of the spreadsheet in gsheets.
  • worksheet
    • value: name
    • description: Name of the worksheet inside the spreadsheet specified.
  • cred
    • value: file path
    • description: Path to the Google API secrets file.
  • scope
    • value: list of urls
    • description: A list of Google API URLs that should be used for gsheets.

discord

  • role
    • value: number
    • description: The identifying, numerical code for a role to mention on the Discord server in the alert message sent.
  • token
    • value: file path
    • description: Path to the Discord bot token file.

steam

  • url
    • value: url
    • description: Valid API url to query Steam's datbase for the payee's SteamID.
  • key
    • value: file path
    • description: Path to the Steam API key.

Usage

  • Start and stop the bot by using the systemd service created previously in setup.
  • Use cronjobs to schedule tasks with the runner.py file.

This is a personal project and is not intended for use outside of my own.

About

Automated payment for the Halogen game server.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages