The version of the bot used directly in the server is more up-to-date and is not currently available in this repository, nor is there any intent to add it to this repository.
Psych2Go Bot (Psi) does useful and fun stuff writen in TypeScript (JavaScript) (NodeJS)
Psych2Go Bot uses DiscordJS 13+ which requires NodeJS 16.6+. Make sure your NodeJS version is even or higher
You also need yarn
as a package/module manager
Clone this project using git
git clone https://github.com/psych2go-devs/psych2go-bot
Change directory to the project (cd psych2go-bot/
), then run the following command to install dependencies
yarn
If you are using this project to host a bot, jump to the Deploying
In src/ contains the source codes of the bot. They are writen in TypeScript; it's similar to JavaScript, you can add type to variable, class, etc. You can make change in the directory.
In dist/ will contain compiled codes from src/. Do not make change on this directory hence they will be replaced will new codes after you compile the codes.
yarn build
This will compile TypeScript codes from src/ into JavaScript codes and save the output to dist/, but will not start the bot after the process.
node .
or
yarn start
This will run the codes on dist/ without compiling the codes on src/. If you haven't compile/build the codes before, this will throw an error.
yarn dev
This will compile TypeScript codes from src/ into JavaScript codes and save the output to dist/, then run the codes on dist/ automatically after the process.
Copy .env.example to .env and edit variables, then run the following command:
yarn build
This will compile the source codes. You should run the command at least once. After that, use the following command to start the bot:
node .
To stop the bot, send a SIGINT
to the script (press Ctrl - C).
See LICENSE.md