Skip to content

Latest commit

 

History

History
39 lines (19 loc) · 1.8 KB

README.md

File metadata and controls

39 lines (19 loc) · 1.8 KB

Edge Link Bus Tracker (Discord)

This bus is written in PHP and allows Discord servers to track the Edge Hill Bus (EL1) for Edge Hill University.

This tracker uses API data from the Government Bus Open Data Service (BODS) in order to pull data in, and uses Google Maps Cloud API in order to display the tracking map.

Prerequisites

Discord Bot Token

Bus Open Data Service API Key

Google Cloud / Static Maps API

Composer

Deployment

To install and use, you'll need the following:

Create a new application in the Discord Developer Portal, and create a Bot for this application. Copy/Generate the token for this bot, and add it to the config.json file.

Add the Discord Application (Bot) you've created to the server you want to use the bot on. It requires Bot and Application (Slash) Commands scopes. You can add it to your Discord server with the following URL: https://discord.com/api/oauth2/authorize?client_id=<<Replace with Client ID (found in Discord Developer Portal)>>&permissions=0&scope=bot%20applications.commands

Clone this repo, and copy config.example.json to config.json, replacing the values provided with the necessary tokens/ID values.

Make sure PHP & Composer is installed, run composer install and run php index.php through the CLI. This will work with the PHP CLI only.

Once the bot is running, use the slash command /bus in a channel to view the current location data of the Edge Link Bus

Authors

Acknowledgements