/RailwayBot

Primary LanguageTypeScriptMIT LicenseMIT

Deploy on Railway


Logo

RailwayBot

A companion bot for railway users that offers better deployment updates as well as usage stats.
Report Bug/Request features

Table of Contents
  1. About RailwayBot
  2. Getting Started
  3. Usage
  4. Features
  5. Contributing
  6. License

About RailwayBot

RailwayBot is an open source companion bot for railway users, made for fulfilling the needs of knowing if you've got a memory leak, or one of your services has crashed, all from the comfort of discord.

Getting Started

Prerequisites

Since this bot is made in typescript, it uses discord.js, and other packages, so make sure you have both node and npm installed.

Installation

  1. Clone the repo

    git clone https://github.com/LaCrak27/RailwayBot.git
  2. Install NPM packages

    npm i
  3. Create an application on discord's developer portal and get it's bot token. (help)

  4. Get a railway api token linked to your account. (help)

  5. Prepare your enviroment file (.env)

     DISCORDTOKEN=(discord bot token)
     LOGCHANNEL=(channel id for deployment and crash logs)
     USAGECHANNEL=(channel id for usage reports)
     RAILWAYAPIKEY=(railway api key)
     TEAMID=(Team ID (only populate if you are gonna use a team token))

(back to top)

Usage

If you only intend on using the bot, then you can just clone the repository, host it on your hosting platform of choice filling all the enviroment variables (we all know what that platform is don't we), and invite the resulting bot to your server.

After this is done, you need to add a webhook to railway for every project you intend on logging its crashes/deployments. Said webhook must point to "<YourBot's URL>/railway".

(back to top)

Features

  • Deploy logs showing all kinds of information about the deploy.
  • Crash alerts for any of your services.
  • Hourly usage reports, showing a detailed breakdown.

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Sponsors

  • drawing $160 USD. You can learn more about them here!