Skip to content

JensOlesen47/MafBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

238 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MafBot

Join our Discord server to play! https://discord.gg/DUEFa9s

Start the bot by running npm start. The bot runs on ports 8080, 8081 & 8443, so make sure those are free. If you want normal people to see your page, make sure that you have port 80 redirected to 8080 and port 443 to 8443 (see https://stackoverflow.com/a/40697538).

Using Typescript

Typescript is essentially object-oriented JavaScript. For this project, it's necessary to install npm and node. I won't go into how to do that here. Install Typescript by running npm i -g typescript. Compile the project by running tsc in the project root directory.

Adding commands

You should first modify commands.ts. Then you can add the command to cmd.ts as a public/private command.

Adding roles / setups

All roles, setups, abilities and factions are described in their corresponding lib file. For abilities, it is necessary to define a function with the same name in actions.ts.

Adding tests

We use the mocha framework for tests: https://mochajs.org/

Any time you add a setup, please ensure that you at least add a test under the test directory. Ideally we should be adding tests for new roles as they are added as well.

About

A Mafia bot for Discord

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors