Beta release

This commit is contained in:
Lukas | AstroGD 2022-11-24 21:25:41 +01:00
parent cd60d7dabc
commit f8d029431f
Signed by: AstroGD
GPG Key ID: 82A5E6C236C535AA
4 changed files with 16 additions and 13 deletions

View File

@ -19,14 +19,16 @@ Removes the word from the server specific blocklist
Returns general information about the bot and the servers stats
## Environment variables
| Name | Description | Required | Example |
| :---------- | :------------------------------------------------------------ | :------: | :------------------ |
| TOKEN | Discord bot token to log into the API with | ▶️/🚀 | NzYzMDP3MzE1Mzky... |
| DB_HOST | Hostname of the database | ▶️ | 127.0.0.1:3546 |
| DB_USERNAME | Username of the database | ▶️ | root |
| DB_PASSWORD | Password of the database | ▶️ | abc123 |
| DB_DATABASE | Database name | ▶️ | white-leopard |
| CLIENT_ID | Client ID of the Discord appication associated with the token | 🚀 | 763035392692274 |
| Name | Description | Required | Example |
| :--------------- | :------------------------------------------------------------------------------ | :------: | :------------------ |
| TOKEN | Discord bot token to log into the API with | ▶️/🚀 | NzYzMDP3MzE1Mzky... |
| DB_HOST | Hostname of the database | ▶️ | 127.0.0.1:3546 |
| DB_USERNAME | Username of the database | ▶️ | root |
| DB_PASSWORD | Password of the database | ▶️ | abc123 |
| DB_DATABASE | Database name | ▶️ | white-leopard |
| CLIENT_ID | Client ID of the Discord appication associated with the token | 🚀 | 763035392692274 |
| DEPLOY_TOKEN | Production Discord bot token to log into the API with | 🚀 | NzYzMDP3MzE1Mzky... |
| DEPLOY_CLIENT_ID | Production Client ID of the Discord appication associated with the deploy token | 🚀 | 763035392692274 |
### Icon explanation:
- ▶️ = Required in runtime

View File

@ -4,8 +4,8 @@ import dotenv from "dotenv";
dotenv.config({ path: path.join(__dirname, "../.env") });
// Environment checking
const TOKEN = process.env["TOKEN"];
const CLIENT_ID = process.env["CLIENT_ID"];
const TOKEN = process.env["DEPLOY_TOKEN"];
const CLIENT_ID = process.env["DEPLOY_CLIENT_ID"];
if (!TOKEN) throw new ReferenceError("Environment variable TOKEN is missing");
if (!CLIENT_ID) throw new ReferenceError("Environment variable CLIENT_ID is missing");

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "eu.astrogd.white-leopard",
"version": "1.0.0-alpha.5",
"version": "1.0.0-beta.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "eu.astrogd.white-leopard",
"version": "1.0.0-alpha.5",
"version": "1.0.0-beta.1",
"license": "CC-BY-NC-ND-4.0",
"dependencies": {
"discord.js": "^14.6.0",

View File

@ -1,6 +1,6 @@
{
"name": "eu.astrogd.white-leopard",
"version": "1.0.0-alpha.5",
"version": "1.0.0-beta.1",
"description": "A Discord bot that checks channel names for blacklisted words and reverts the changes if necessary",
"main": "build/index.js",
"scripts": {
@ -9,6 +9,7 @@
"deploy-commands:dev": "ts-node ci/devDeploy.ts",
"deploy-commands:prod": "ts-node ci/deploy.ts",
"deploy:dev": "npm run build && npm run deploy-commands:dev && docker compose build && docker compose up -d",
"deploy:prod": "rimraf build && npm run build && npm run deploy-commands:prod && docker build -t astrogd/white-leopard:latest . && docker push astrogd/white-leopard:latest",
"start": "npm run build && npm run deploy-commands:dev && docker-compose up --no-start && docker compose start database && node --enable-source-maps .",
"migration:create": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:generate -d src/data/dataSource.ts -p src/data/migrations/data",
"migration:run": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:run -d src/data/dataSource.ts",