MaksiRose / paw-and-paper

Multipurpose bot for roleplayers, alterhumans and furries, featuring a community-centered RPG.
https://discord.com/api/oauth2/authorize?client_id=862718885564252212&permissions=518385954112&scope=bot
GNU General Public License v3.0
3 stars 3 forks source link
discord discord-bot discord-js

Paw and Paper

What does Paw and Paper do?

Paw and Paper has two main usages:

Firstly, it has powerful tools to help make your roleplay more immersive. You can create extremely customizable characters including name, avatar, species, pronouns, description, and color. You can also send messages as though they are coming from these characters.

But this is far from the end: Roleplayers can also set custom skills/ability scores, that they can then use to roll dice. Users can also find, visit and talk to people from other servers to get to know more people and roleplay together!

With the same characters that you already created, you can now take part in a community-driven, interactive roleplay game about animals surviving in the wild. Your goal is to go up the ranks, level up, help out your friends and keep your stats high. You can go to different biomes, where you can find herbs, stumble upon animals to fight, or do quests.

Why choose Paw and Paper?

Paw and Paper is a perfect companion for roleplayers, alterhumans, and anyone who enjoys RPGs.

We do our very best to make the bot as easy to use for everyone, no matter how tech-savvy they are. For this, we use all the tools that Discord gives us to make the experience as immersive as possible.

And if there is something missing that you would like to see added to the bot, you can easily suggest it, and get in touch with the developers. Monthly updates bring exciting new features to ensure the quality of P&P stays top-level.

How do I use Paw and Paper?

Paw and Paper uses slash commands to communicate with the user. The basic command to get a list of all other commands is /help.

Here are some of the most important commands:

Want to have Paw and Paper on your server? Use this link to invite it:

https://discord.com/api/oauth2/authorize?client_id=862718885564252212&permissions=518385954112&scope=bot

Do you have questions or need support? Join our discord server:

https://discord.gg/9DENgj8q5Q

Contributing

Add a species

If you just want to suggest a species, fill out this form.

If you want to add a species, click here to open the appropriate file.

First click the edit button (in form of a pencil) at the top right of the screen. Then go to the part of the file that starts with export const speciesInfo, and at the bottom of it, paste this "species block" behind the last one of those species blocks:

'NAME': {
    diet: 'SpeciesDietType.Herbivore/SpeciesDietType.Omnivore/SpeciesDietType.Carnivore',
    habitat: 'SpeciesHabitatType.Cold/SpeciesHabitatType.Warm/SpeciesHabitatType.Water',
    biome1OpponentArray: ['ABC', 'DEF', 'GHI'],
    biome2OpponentArray: ['JKL', 'MNO'],
    biome3OpponentArray: ['PQR', 'STU'],
},

Replace NAME with the name of your species. Make sure to always use lowercase.

Note: Species should not be extinct, mythical, and should not be too specific, for example a breed of dog, or they will not be accepted. Rule of thumb is that if it is so similar to another animal that they can be grouped together without changing anything in that block, they should be grouped together.

Keep either herbivore, omnivore or carnivore depending on the diet of that species. Choose whether the species prefers cold or warm environments, or if it lives in the water.

In the three following Arrays, reference 2-4 animals each. Make sure that you use the exact name used for an animal in one of the previous species blocks. Make sure that the animals are those that your animal would actually meet and interact with. Biome1 should contain animals that are easy to defeat, Biome2 should contain animals that are equally strong, and Biome3 should contain animals that would most likely defeat your animal.

You should also make sure to go to the species blocks of the animals you referenced, and paste in your animal into the appropriate one of their biome opponent arrays. You don't have to do this for every animal you referenced.

Create a new issue

If you see a problem in the code or one comes up during usage, search if an issue already exists. If a related issue doesn't exist, open a new one. You can also use the ticket command from within the Bot to start a new issue.

Solve an issue

If you find an issue that you would like to fix, first make sure that you can replicate it. If you can confirm the issue, clone the repository, then start working on a fix. Once you believe you have fixed the issue, you can create a pull request.

If you find a smaller issue like a typo, you can open the file from within GitHub, click on edit, fix it and then propose changes.

Cloning the repository

Open a terminal and use the 'cd' command do navigate to the folder that you want the repository to be cloned to. then write:

git clone https://github.com/MaksiRose/paw-and-paper.git
git checkout stable
npm install

Keep the terminal open, you will need it later. In the repository, create a config.json file. This needs to include the following information:

{
    "token": "your discord token",
    "test_guild_id": "your test guild",
    "bfd_token": "your discords.com token",
    "bfd_authorization": "authorization chosen on discords.com",
    "top_token": "your top.gg token",
    "top_authorization": "authorization chosen on top.gg",
    "dbl_token": "your discordbotlist.com token",
    "dbl_authorization": "authorization chosen on discordbotlist.com",
    "github_token": "your github token",
    "webhook_name": "PnP Profile Webhook", // the webhook name chosen for discord channels, should be unique
    "default_color": "#b4a257",
    "error_color": "#d0342c",
    "update_channel_id": "channel users can receive updates from",
    "ticket_channel_id": "channel tickets are sent to",
    "database_password": "your database password"
}

Anything that you don't have or need from this list can be left as an empty string.

To get a Discord Token, create a Discord Application. Generate a GitHub Token here. The colors can be modified by will.

Before the config.json file can be closed, the database needs to be installed. First, download PostgreSQL. Keep the server "localhost", the port "5432" and the username "postgres", the password for that username can be picked by yourself and should be added to the config.json under "database_password".

After everything is installed, open a new terminal window and type psql to open the SQL Shell (on Mac, a new Application should be available to do the same). In the shell, type create database pnp;, then grant all privileges on database pnp to postgres;. Don't forget the semicolons.

Save the config.json file, go back to the terminal, and type npm run test. Alternatively, you can also install pm2 and run npm run start, then npm run logs. Other command are npm run reload and npm run stop. If you don't use pm2, make sure to keep the terminal window open, otherwise the Bot will go offline. If you turn off the PC that is running the Bot, the Bot will go offline. I recommend running it on a server or on a raspberry pi for this reason.

Introduction to the repository

The repository is structured in the following way:

// THIS NEEDS UPDATING

src  
│   index.ts    
│
└───handlers
│   │   events.ts
│   │   commands.ts
│   │   users.ts
│   │   servers.ts
│   │   votes.ts
│   │   ...

│   
└───events
│   │   ready.ts
│   │   messageCreate.ts
│   │   interactionCreate.ts
│   │   ...
│   
└───models
│   │   profileModel.ts
│   │   serverModel.ts
│   
└───commands
│   └───miscellanious
│   │   │   help.ts
│   │   │   ticket.ts
│   │   │   ...
│   │
│   └───gameplay_primary
│   │   │   play.ts
│   │   │   explore.ts
│   │   │   ...
│   │
│   └───...
│  
└───commands_guild
│   └───(guildId...)
│   │   │   ...
│  
└───contextmenu
│   │   ...
│  
└───utils
│   │   ...
│
└───database
│   └───open_tickets
│   │   ...
│

If you have any feedback, please open a ticket or tell it to me directly on the Bots Discord server.