Skip to content

CivYoahtl/trial-recorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

448706a · Jun 21, 2024

History

53 Commits
Sep 18, 2023
May 20, 2024
Apr 21, 2023
Apr 21, 2023
Apr 21, 2023
Apr 21, 2023
May 20, 2024
Jun 21, 2024
Jun 21, 2024
Jun 21, 2024
Jun 21, 2024

Repository files navigation

Yoahtl Trial Recorder

A simple util to easily record trials with the Yoahtl court system as markdown files for use in other systems, like the website.

Usage

  1. Create a Discord bot and invite it to your server.
  2. Set the environment variables listed below.
  3. Run the bot.
    go run .
    or just run the docker image

The bot will then record the messages in the channel specified by CHANNEL_ID from the message with ID START_MSG_ID to the message with ID END_MSG_ID and save them to a file named <trial name>.md in the transcripts folder, where <trial name> is the value of the TRIAL_NAME environment variable.

Environment Variables

  • DISCORD_TOKEN - The token to use to connect to Discord.
  • CHANNEL_ID - The ID of the channel to record from.
  • START_MSG_ID - The ID of the message to start recording from. This is exclusive, so the message with this ID will not be recorded.
  • TRIAL_NAME - The name of the trial to record.
  • NAME_OVERRIDE - A way to override the name of a discord user. Takes a json object with the discord user ID as the key and the name to use as the value. For example, {"123456789012345678": "John Doe"}.

(The bot will also take an .env file in the current directory if it exists.)

Go Version

1.20