Compare commits
No commits in common. "main" and "v3.6.1-dev-alerttest" have entirely different histories.
main
...
v3.6.1-dev
@ -13,7 +13,7 @@ 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}`;
|
||||||
const replyEmbed = fn.embeds.text(commandData);
|
const replyEmbed = fn.embeds.text(commandData);
|
||||||
message.reply({ embeds: [ replyEmbed ]});
|
message.reply({ embeds: [ replyEmbed ]});
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
@ -22,8 +22,8 @@ module.exports = {
|
|||||||
const replyEmbed = fn.embeds.text(commandData);
|
const replyEmbed = fn.embeds.text(commandData);
|
||||||
message.reply({ embeds: [ replyEmbed ]});
|
message.reply({ embeds: [ replyEmbed ]});
|
||||||
|
|
||||||
const errorEmbed = fn.embeds.error(`An error has occurred in command ${this.name}:\n${err}`);
|
const errorEmbed = fn.embeds.error(`An error has occurred in command ${this.name}:\n${JSON.stringify(err)}`);
|
||||||
fn.sendAlert(errorEmbed, message.client);
|
fn.sendAlert(errorEmbed);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -921,7 +921,7 @@ const functions = {
|
|||||||
const errorId = digits.join("");
|
const errorId = digits.join("");
|
||||||
return errorId;
|
return errorId;
|
||||||
},
|
},
|
||||||
async sendAlert(embed, client) {
|
async sendAlert(embed) {
|
||||||
const statusChannel = await client.channels.fetch(statusChannelId)
|
const statusChannel = await client.channels.fetch(statusChannelId)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user