diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 139c6f63..017dcc37 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ docs. ## System Requirements and Setup -PartBot requires Node.js v16+ (untested on lower versions) to run, and uses `npm` as the package manager. +PartBot requires Node.js v18+ (v16+ may work but v18+ is recommended) to run, and uses `npm` as the package manager. To install, clone this repository and install dependencies. @@ -22,8 +22,8 @@ This will also run the `prepare` script, which installs Husky hooks and patches ## Configuration -Once with setup, please copy the `.env.example` file to `.env` and change the values accordingly. This file populates -the environment variable. The full list of supported env variables is below: +Once setup is complete, please copy the `.env.example` file to `.env` and change the values accordingly. This file populates +the environment variables. The full list of supported env variables is below: - `PREFIX`: The prefix to use for commands on PS. - `PS_USERNAME`: The username for the chatbot on PS. @@ -44,4 +44,4 @@ automatically run on every pull request. --- -For details about the structure of PartBot (globals, types, layouts, etc.) please refer to the [structure documentation](https://github.com/PartMan7/PartBot/tree/main/docs/STRUCTURE.md). +For details about the structure of PartBot (globals, types, layouts, etc.) please refer to the [structure documentation](docs/STRUCTURE.md). diff --git a/README.md b/README.md index 86e5f4e5..6512df47 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ PartBot does a lot of stuff across a wide variety of platforms, with a heavy foc ## Suggestions, Bug Reports, and Feedback -See [Suggestions & Feedback](https://github.com/PartMan7/PartBot/tree/main/docs/SUGGESTIONS.md) for ideas, bugs, and requests. Contributions are always welcome! +See [Suggestions & Feedback](docs/SUGGESTIONS.md) for ideas, bugs, and requests. Contributions are always welcome! ## Getting Started @@ -20,7 +20,7 @@ See [Suggestions & Feedback](https://github.com/PartMan7/PartBot/tree/main/docs/ ### Installation & Setup -See the [setup docs](/SETUP.md) for the setup process. +See the [setup docs](SETUP.md) for the setup process. ## Translations @@ -33,7 +33,7 @@ Currently, PartBot supports the following languages on Showdown: - Portuguese (PoC [@Seyhura](https://github.com/Seyhura)) - French (PoC [@Distrib](https://github.com/Distrib-ps)) -Feel free to refer to the [source code](https://github.com/PartMan7/PartBot/tree/main/src/i18n/languages) for the actual translations. +Feel free to refer to the [source code](src/i18n/languages) for the actual translations. ## Credits diff --git a/package.json b/package.json index 1f2c4f0d..5a37cd58 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "keywords": [], "author": "PartMan7", - "license": "ISC", + "license": "MIT", "dependencies": { "@js-temporal/polyfill": "^0.5.1", "@swc/core": "^1.7.40", diff --git a/src/config/web.ts b/src/config/web.ts index 94f152f8..e2421b45 100644 --- a/src/config/web.ts +++ b/src/config/web.ts @@ -1 +1 @@ -export const port = process.env.WEB_PORT ?? 8080; +export const port = parseInt(process.env.WEB_PORT ?? '8080', 10); diff --git a/src/globals/prototypes.ts b/src/globals/prototypes.ts index 49115476..cba54d8d 100644 --- a/src/globals/prototypes.ts +++ b/src/globals/prototypes.ts @@ -188,7 +188,7 @@ Object.defineProperties(Array.prototype, { enumerable: false, writable: false, configurable: false, - value: function T(this: T[], amount: number, rng?: RNGSource): T[] { + value: function (this: T[], amount: number, rng?: RNGSource): T[] { const RNG = useRNG(rng); const sample = Array.from(this), out: T[] = []; diff --git a/src/index.ts b/src/index.ts index 41a87b7e..8fc26e48 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ import 'dotenv/config'; import '@/globals'; +import { Logger } from '@/utils/logger'; Logger.log('PartBot is starting up...'); @@ -8,4 +9,3 @@ import '@/ps'; import '@/web'; import '@/sentinel'; -import { Logger } from '@/utils/logger';