A node-based BC bot based on the old bot-api. Its functionality is divided up into 'games' and you configure the bot to run one of them via its config file.
Most code here is free to use (Apache licensed) but some is taken with permission from the original bot hub (eg. kidnappers game, roleplay challenge).
We hope that this will be useful for people to make fun and interesting bots for the club! You're also welcome to run the bots included yourself.
To make a new game, you can copy the 'petspa' game file and use that as a base, and add your new file into bot.ts.
Usual club ettiquette applies, eg:
- Make sure people know your bot is a bot, not a real player
- Make sure people consent before your bot binds them / changes their clothing etc.
- Watch how many messages your bot sends. Even if it stays under the ratelimit, constantly sending messages will affect the server.
- Make bots fun / interesting / useful, rather than to just sit in rooms.
Anything in src/hub is from the original bot hub. This includes the 'kidnappers' game and the roleplay challenge bot. These are copied in as they were, but with additions since.
Things in src/games use a newer, more event-based API. If you write new bots, they should probably look like the ones in here.
Some things are unfinished and imperfect, but there should be enough here to make working and fun bots! Improvements and fixes are always welcome.
The bot can either be run locally or via the Docker image.
- Get an environment with NodeJS, pnpm (https://pnpm.io/installation) and git
- Check out the bot's code
git clone git@github.com:FriendsOfBC/ropeybot.git - Copy
config.sample.jsontoconfig.jsonand customise it: you'll need to provide at least a username and password for an account that the bot can log in as. You can also choose what game the bot will run. - Enter the directory and install the dependencies:
cd ropeybotpnpm install - Start the bot!
pnpm start
- Install docker
- Create a config file as in the steps for running locally
- Run the bot, mapping in the config file you just made:
docker run --rm -it -v ${PWD}/config.json:/bot/cfg/config.json ghcr.io/FriendsOfBC/ropeybot:main
A very simple game where players add dares and then draw them without knowing who added each dare. The dares added by players are stored in two files in the bot's working directory: dares.json and unuseddares.json: delete both of these files to reset the dares.
This is an example of how to use the API to make an interactive map room, but also applies to non map rooms. You can use this file as a base for things like how to react when players enter areas on a map, adding restraints and setting their properties, sending and reacting to messages.
From the original bot hub. Code is mostly unmodified from its original state.
Also from the original bot hub.