Skip to content

tatupesonen/formatbot

Repository files navigation

FormatBot

Tests

Formats the code blocks of a message using Discord context menus.

Currently supported languages

  • C
  • C++
  • C#
  • Java
  • Rust
  • TypeScript
  • JavaScript
  • Python
  • JSON
  • YAML
  • HTML
  • CSS

Invite

If you wish to invite the bot to your server, you can do it using this invite

Required Permissions

  • Read Messages
  • Send Messages
  • application.commands scope

Getting Started ⚙️

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Requirements

  • Docker
  • Docker Compose (compatible with docker-compose version 3.8)

For development

  • Yarn
  • Node.js >= 16.6.0

Get the Docker version you need here!

Usage

image

Setup

Since this bot has a docker-compose.yml file and is hosted on DockerHub, all you need to start your own version of Formatbot locally is to clone this repository and set up the .env file.

The .env file is used to configure the bot token and owner id, in the following format:

DISCORD_TOKEN=<insert token>
OWNER=<insert owner id>

For Linux and Mac run

$ cp .env.example .env

For Windows run

> Copy-Item .env.example .env

Edit the .env file with your favourite editor, filling out the following properties:

Run the bot via docker-compose

$ docker-compose up --build --detach

Without Docker

Create the .env file like before.
Then run yarn && yarn dev to start a development environment.

Authors 👤

  • Tatu Pesonen - Original Author - @tatupesonen
  • Donny Roufs - Motivational speaker / setting up testing architecture - @donnyroufs
  • Ben Jamming - Improve code blocks parsing a lot - @BenJammingKirby
  • Dajeki - Improving the bot's logo - @Dajeki See also the list of contributors who participated in this project.

Show your support ⭐️

Give a ⭐️ if this project helped you!

License 📝


This project is [GPLv3](LICENSE) licensed.