Add client to sendAlert
All checks were successful
NodBot PE Dockerization / build (push) Successful in 19s
All checks were successful
NodBot PE Dockerization / build (push) Successful in 19s
This commit is contained in:
parent
8580dda6c8
commit
46e5079eaf
@ -23,7 +23,7 @@ module.exports = {
|
|||||||
message.reply({ embeds: [ replyEmbed ]});
|
message.reply({ embeds: [ replyEmbed ]});
|
||||||
|
|
||||||
const errorEmbed = fn.embeds.error(`An error has occurred in command ${this.name}:\n${JSON.stringify(err)}`);
|
const errorEmbed = fn.embeds.error(`An error has occurred in command ${this.name}:\n${JSON.stringify(err)}`);
|
||||||
fn.sendAlert(errorEmbed);
|
fn.sendAlert(errorEmbed, message.client);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -921,7 +921,7 @@ const functions = {
|
|||||||
const errorId = digits.join("");
|
const errorId = digits.join("");
|
||||||
return errorId;
|
return errorId;
|
||||||
},
|
},
|
||||||
async sendAlert(embed) {
|
async sendAlert(embed, client) {
|
||||||
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