v3.6.1 Requests Expansion #32

Merged
voidf1sh merged 11 commits from v3.6.1 into main 2026-10-01 19:38:35 +00:00
2 changed files with 33 additions and 6 deletions
Showing only changes of commit acfe540148 - Show all commits

View File

@ -13,12 +13,17 @@ module.exports = {
try { try {
fn.upload.request(requester, requestText, messageUrl, message.client); fn.upload.request(requester, requestText, messageUrl, message.client);
// Set the content to sent a text embed notifying the user of success // Set the content to sent a text embed notifying the user of success
commandData.content = `Your request has been submitted!\nRequest: ${requestText}`; commandData.content = `Your request has been submitted!\nRequest: ${request}`;
message.reply(fn.embeds.text(commandData)); const replyEmbed = fn.embeds.text(commandData);
message.reply({ embeds: [ replyEmbed ]});
} catch(err) { } catch(err) {
console.error(err); console.error(err);
commandData.content = "An error occurred while saving the request, please try again later."; commandData.content = "An error occurred while saving the request, please try again later.";
message.reply(fn.embeds.text(commandData)); 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);
} }
}, },
}; };

View File

@ -9,6 +9,7 @@ const dbPass = process.env.dbPass;
const dbPort = process.env.dbPort; const dbPort = process.env.dbPort;
const isDev = process.env.isDev; const isDev = process.env.isDev;
const ownerId = process.env.ownerId; const ownerId = process.env.ownerId;
const statusChannelId = process.env.statusChannelId;
// filesystem // filesystem
const fs = require('fs'); const fs = require('fs');
@ -302,11 +303,13 @@ const functions = {
return { embeds: [jointsEmbed], components: [jointsPageAR], ephemeral: true }; return { embeds: [jointsEmbed], components: [jointsPageAR], ephemeral: true };
}, },
text(commandData) { text(commandData) {
return { embeds: [new Discord.MessageEmbed() const textEmbed = new Discord.MessageEmbed()
.setAuthor({name: commandData.command}) .setAuthor({ name: commandData.command })
.setDescription(commandData.content) .setDescription(commandData.content)
.setTimestamp() .setTimestamp()
.setFooter({text: commandData.author})]}; .setFooter({text: commandData.author});
return textEmbed;
}, },
requests(commandData, indexedRequests) { requests(commandData, indexedRequests) {
const requestsEmbed = new Discord.MessageEmbed() const requestsEmbed = new Discord.MessageEmbed()
@ -458,6 +461,14 @@ const functions = {
.setDescription('* Data Collection – NodBot does collect personal data, including but not limited to: location, IP address, MAC address, physical address, mother\'s maiden name, social security number, credit card numbers, phone fingerprints, physical fingerprints, penis length and girth, first pet\'s name, city where you met your spouse, and city where your parents met.\n* Payment Info – All payments are processed through a sketchy-looking PayPal link. NodBot and voidf1sh take no responsibility if your bank, CPA, lawyer, or local PD calls you afterward.\n* Chat Logs – NodBot may or may not remember every dumbass thing you’ve ever typed. Just assume it does.\n* Third-Party Sharing – Your usage data may be shared with savage\'s mom\n* Right to Be Forgotten – You can request NodBot forget your existence, but that requires a one-time processing fee of $50.'); .setDescription('* Data Collection – NodBot does collect personal data, including but not limited to: location, IP address, MAC address, physical address, mother\'s maiden name, social security number, credit card numbers, phone fingerprints, physical fingerprints, penis length and girth, first pet\'s name, city where you met your spouse, and city where your parents met.\n* Payment Info – All payments are processed through a sketchy-looking PayPal link. NodBot and voidf1sh take no responsibility if your bank, CPA, lawyer, or local PD calls you afterward.\n* Chat Logs – NodBot may or may not remember every dumbass thing you’ve ever typed. Just assume it does.\n* Third-Party Sharing – Your usage data may be shared with savage\'s mom\n* Right to Be Forgotten – You can request NodBot forget your existence, but that requires a one-time processing fee of $50.');
return { content: announcement, embeds: [ embed1, embed2 ] }; return { content: announcement, embeds: [ embed1, embed2 ] };
},
error(errorText) {
const errorEmbed = new Discord.MessageEmbed()
.setAuthor({ name: "Error!" })
.setDescription({ text: errorText })
.setFooter({ text: appVersion });
return errorEmbed;
} }
}, },
collect: { collect: {
@ -909,6 +920,17 @@ const functions = {
} }
const errorId = digits.join(""); const errorId = digits.join("");
return errorId; return errorId;
},
async sendAlert(embed) {
const statusChannel = await client.channels.fetch(statusChannelId)
.catch(err => {
console.error(err);
});
await statusChannel.send({ embeds: [ embed ] })
.catch(err => {
console.error(err);
});
} }
}; };