TRPG Bot is a text-based role-playing game helper Discord Bot made to streamline SNAP gameplay, fully developed in Node.js.
TRPG Bot provides several features that enhance SNAP gameplay:
- Automated character sheet management and updates
- Custom dice roll functions
1. Register yourself as a Player
Simply run !trpg player register
2. Register a Character sheet
Upload a Character sheet .txt file and type the command !trpg sheet register
.
Important: The file must follow the SNAP Character sheet template
3. Select your current sheet
Now you can select your current sheet by typing !trpg player playAs {id}
, where {id} is your desired sheet ID. If you don't know your sheet ID, run !trpg player listSheets
, and you'll be able to see all your registered sheets and their IDs.
In SNAP, you can attempt to use a Skill you have dice on, or you might be asked to do a plain dice roll.
When you want to use a Skill, type !trpg roll {skill_name}
, where {skill_name} is the Skill you are attempting. For example:
!trpg roll combat_melee
John Doe rolled for Combat (melee) [4d6]
Result:4,3,5,3
→ 15
Command | Arguments | Description | Example |
---|---|---|---|
!trpg sheet register |
File (attachment) [Required] | Registers a Character sheet to your Player | |
!trpg sheet export {sheet_id} |
sheet_id - The desired sheet ID. [Optional] | Exports a Character sheet by ID or your current sheet | !trpg sheet export 274662764792774656__charsheet.txt-387 |
Command | Arguments | Description | Example |
---|---|---|---|
!trpg player register |
-- | Registers yourself as a Player | |
!trpg player listSheets |
-- | Displays your registered Character sheets | |
!trpg player current |
-- | Displays your current Character sheet (Who you are playing as) | |
!trpg player playAs {sheet_id} |
sheet_id - The desired sheet ID [Required] | Updates your current Character sheet | !trpg player playAs 274662764792774656__charsheet.txt-387 |
Command | Arguments | Description | Example |
---|---|---|---|
!trpg roll {skill / dice} |
skill - The skill you want to roll for dice - The amount of dice to roll [Required] |
Rolls dice for a Skill or the amount provided | !trpg roll combat_melee !trpg roll 2d6 |
Command | Arguments | Description | Example |
---|---|---|---|
!trpg campaign start {campaign_name} |
campaign_name - The name for the new campaign [Required] | Starts a new campaign with the given name | !trpg campaign start A wonderful adventure |
!trpg campaign end {campaign_name} |
campaign_name - The name of the campaign to end [Required] | Ends the campaign | !trpg campaign end A wonderful adventure |
!trpg campaign getLogs {campaign_name} |
campaign_name - The name of the campaign to get the logs from [Required] | Exports a file with the entire campaign's logs | !trpg campaign getLogs A wonderful adventure |
Name | Code |
---|---|
Combat (Melee) | combat_melee |
Combat (Ranged) | combat_ranged |
Communication | communication |
Orientation | orientation |
Stealth | stealth |
Profiling | profiling |
Science | science |
Occult | occult |
Faith | faith |
Clearence Level | clearence_level |
This project currently uses:
- Node.js
- Mongoose (MongoDB)
- discord.js
This is a simple guide for developers who want to contribute new features to this bot.
- Node.js
- npm
-
Clone the repository:
git clone https://github.com/joao-m-santos/trpg-bot.git
-
Move to the project directory:
cd trpg-bot
-
Install the node packages:
npm install
-
Create a
private-config.json
file:touch private-config.json
-
Add your Discord token and your MongoDB connection string to your
private-config.json
file:{ "dbString": "mongodb-connection-string", "token": "your-token" }
In order to contribute to the project, please follow these steps:
- Fork the project
- Create your feature branch (git checkout -b feature/amazing-feature)
- Commit your changes (git commit -m 'Add some amazing feature')
- Push to the branch (git push origin feature/amazing-feature)
- Open a pull request
Joao Santos - jm_santos7@hotmail.com
Made with ❤ by Joao