Compare commits

..

6 Commits

Author SHA1 Message Date
304503f7d8 Merge pull request 'v3.6.1 Requests Expansion' (#32) from v3.6.1 into main
All checks were successful
NodBot Production Dockerization / build (push) Successful in 21s
Reviewed-on: #32
2026-10-01 19:38:34 +00:00
7b504a2312 Re-fix variable ref
All checks were successful
NodBot PE Dockerization / build (push) Successful in 21s
2026-10-01 15:32:38 -04:00
8039f8f1c7 Print raw error instead of trying to stringify it
All checks were successful
NodBot PE Dockerization / build (push) Successful in 20s
2026-10-01 15:30:45 -04:00
46e5079eaf Add client to sendAlert
All checks were successful
NodBot PE Dockerization / build (push) Successful in 19s
2026-10-01 15:28:03 -04:00
8580dda6c8 Change MessageEmbed Description to just a string
All checks were successful
NodBot PE Dockerization / build (push) Successful in 19s
2026-10-01 15:25:53 -04:00
211e07f5f0 Fix tagging system
All checks were successful
NodBot PE Dockerization / build (push) Successful in 10s
2026-10-01 15:15:09 -04:00
5 changed files with 18 additions and 18 deletions

View File

@ -34,7 +34,7 @@ jobs:
- name: Build the Docker image
run: |
cd /var/lib/act_runner/nodbot
docker build --target dev . --file Dockerfile --tag v0idf1sh/nodbot
docker build --target dev . --file Dockerfile --tag v0idf1sh/nodbot:dev
- name: Log into Docker Hub
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
- name: Push image to Docker Hub

View File

@ -33,7 +33,7 @@ jobs:
- name: Build the Docker image
run: |
cd /var/lib/act_runner/nodbot
docker build --target prod . --file Dockerfile --tag v0idf1sh/nodbot
docker build --target prod . --file Dockerfile --tag v0idf1sh/nodbot:prod
- name: Log into Docker Hub
run: docker login -u $DHUB_UNAME -p $DHUB_PWORD
- name: Push image to Docker Hub

View File

@ -1,13 +1,3 @@
FROM node:18 AS prod
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json ./
RUN npm install
COPY . .
# CMD ["/bin/sh", "-c", "node main.js 2> /logs/nodbot.error 1> /logs/nodbot.log"]
CMD ["/bin/sh", "-c", "node main.js 2> /logs/$(date +%Y-%m-%d_%H-%M-%S)-error.txt 1> /logs/$(date +%Y-%m-%d_%H-%M-%S)-status.txt"]
# Dev Build
FROM node:18 AS dev
RUN mkdir -p /usr/src/app
@ -17,4 +7,14 @@ COPY package.json ./
RUN npm install
COPY . .
# Invoke the bot without redirecting STDOUT and STDERR so that docker logs can be used.
CMD ["/bin/sh", "-c", "node main.js"]
CMD ["/bin/sh", "-c", "node main.js"]
FROM node:18 AS prod
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json ./
RUN npm install
COPY . .
# CMD ["/bin/sh", "-c", "node main.js 2> /logs/nodbot.error 1> /logs/nodbot.log"]
CMD ["/bin/sh", "-c", "node main.js 2> /logs/$(date +%Y-%m-%d_%H-%M-%S)-error.txt 1> /logs/$(date +%Y-%m-%d_%H-%M-%S)-status.txt"]

View File

@ -13,7 +13,7 @@ module.exports = {
try {
fn.upload.request(requester, requestText, messageUrl, message.client);
// Set the content to sent a text embed notifying the user of success
commandData.content = `Your request has been submitted!\nRequest: ${request}`;
commandData.content = `Your request has been submitted!\nRequest: ${requestText}`;
const replyEmbed = fn.embeds.text(commandData);
message.reply({ embeds: [ replyEmbed ]});
} catch(err) {
@ -22,8 +22,8 @@ module.exports = {
const replyEmbed = fn.embeds.text(commandData);
message.reply({ embeds: [ replyEmbed ]});
const errorEmbed = fn.embeds.error(`An error has occurred in command ${this.name}:\n${JSON.stringify(err)}`);
fn.sendAlert(errorEmbed);
const errorEmbed = fn.embeds.error(`An error has occurred in command ${this.name}:\n${err}`);
fn.sendAlert(errorEmbed, message.client);
}
},
};

View File

@ -465,7 +465,7 @@ const functions = {
error(errorText) {
const errorEmbed = new Discord.MessageEmbed()
.setAuthor({ name: "Error!" })
.setDescription({ text: errorText })
.setDescription(errorText)
.setFooter({ text: appVersion });
return errorEmbed;
@ -921,7 +921,7 @@ const functions = {
const errorId = digits.join("");
return errorId;
},
async sendAlert(embed) {
async sendAlert(embed, client) {
const statusChannel = await client.channels.fetch(statusChannelId)
.catch(err => {
console.error(err);