Random-Lunacy / discord-frotz-bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

discord-frotz-bot

About The Project

This project enables you to host and run interactive fiction games on Discord using Frotz, a popular Z-machine interpreter. Most interactive fiction games with a .z[number] file extension should work correctly.

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

  • Node.JS

    Verify you have Node.JS v18 or later installed:

    node --version
  • NPM

    Verify you have NPM installed:

    npm --version
  • Frotz

    This bot uses the dfrotz implementation of Frotz to run the interactive fiction games. Verify your Frotz installation by running the following command:

    dfrotz -v

Configure a Discord Bot Account

Follow the steps for Creating a Bot Account and connecting it to your Discord server.

Once you've created your bot account in Discord you will need to enable the Message Content Intent under Bot -> Privileged Gateway Intents.

When building a URL to invite the bot account to a server select Read Messages/View Channels and Send Messages under Bot Permissions.

Make note of your bot’s token, you will need to add it to the configuration for discord-frotz-bot. Note that this token is essentially your bot’s password. You should never commit this token to the repository or share this token with anyone else.

Installation

  1. Clone the repo.
    git clone https://github.com/Random-Lunacy/discord-frotz-bot.git
  2. Install NPM packages.
    cd discord-frotz-bot
    npm install
  3. Create a .env file in the repository root from .env.template.
    cp .env.template .env
  4. Edit the .env file and replace your-token-goes-here with your bot token.
  5. Copy the Z-machine games files you want your bot to use to the games folder.
  6. Create a games.json file in the games folder from games/games.json.template.
    cp games/games.json.template games/games.json
  7. Edit games.json to include for your Z-machine games. See games/games.md for more information.

Usage

TODO: Add examples of how to use the bot.

Roadmap

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

License

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

Contact

Project Link: https://github.com/Random-Lunacy/discord-frotz-bot

Acknowledgments

  • Many thanks to the team who build and maintain Frotz. Without their work this bot would not be possible.

About

License:MIT License


Languages

Language:JavaScript 100.0%