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.
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.
-
Verify you have Node.JS v18 or later installed:
node --version
-
Verify you have NPM installed:
npm --version
-
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
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.
- Clone the repo.
git clone https://github.com/Random-Lunacy/discord-frotz-bot.git
- Install NPM packages.
cd discord-frotz-bot npm install
- Create a
.env
file in the repository root from.env.template
.cp .env.template .env
- Edit the
.env
file and replaceyour-token-goes-here
with your bot token. - Copy the Z-machine games files you want your bot to use to the
games
folder. - Create a
games.json
file in thegames
folder fromgames/games.json.template
.cp games/games.json.template games/games.json
- Edit
games.json
to include for your Z-machine games. Seegames/games.md
for more information.
TODO: Add examples of how to use the bot.
See the open issues for a full list of proposed features (and known issues).
Distributed under the MIT License. See LICENSE
for more information.
Project Link: https://github.com/Random-Lunacy/discord-frotz-bot
- Many thanks to the team who build and maintain Frotz. Without their work this bot would not be possible.