V1.0.0-beta.1 #1

Merged
AstroGD merged 10 commits from dev into main 2022-11-24 21:29:42 +01:00
4 changed files with 16 additions and 13 deletions
Showing only changes of commit f8d029431f - Show all commits

View File

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

View File

@ -4,8 +4,8 @@ import dotenv from "dotenv";
dotenv.config({ path: path.join(__dirname, "../.env") }); dotenv.config({ path: path.join(__dirname, "../.env") });
// Environment checking // Environment checking
const TOKEN = process.env["TOKEN"]; const TOKEN = process.env["DEPLOY_TOKEN"];
const CLIENT_ID = process.env["CLIENT_ID"]; const CLIENT_ID = process.env["DEPLOY_CLIENT_ID"];
if (!TOKEN) throw new ReferenceError("Environment variable TOKEN is missing"); if (!TOKEN) throw new ReferenceError("Environment variable TOKEN is missing");
if (!CLIENT_ID) throw new ReferenceError("Environment variable CLIENT_ID 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", "name": "eu.astrogd.white-leopard",
"version": "1.0.0-alpha.5", "version": "1.0.0-beta.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "eu.astrogd.white-leopard", "name": "eu.astrogd.white-leopard",
"version": "1.0.0-alpha.5", "version": "1.0.0-beta.1",
"license": "CC-BY-NC-ND-4.0", "license": "CC-BY-NC-ND-4.0",
"dependencies": { "dependencies": {
"discord.js": "^14.6.0", "discord.js": "^14.6.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "eu.astrogd.white-leopard", "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", "description": "A Discord bot that checks channel names for blacklisted words and reverts the changes if necessary",
"main": "build/index.js", "main": "build/index.js",
"scripts": { "scripts": {
@ -9,6 +9,7 @@
"deploy-commands:dev": "ts-node ci/devDeploy.ts", "deploy-commands:dev": "ts-node ci/devDeploy.ts",
"deploy-commands:prod": "ts-node ci/deploy.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: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 .", "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: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", "migration:run": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:run -d src/data/dataSource.ts",