update messagecache logging

This commit is contained in:
nolan 2021-06-09 17:50:56 -07:00
parent 7964573beb
commit 8afd68e0d8
2 changed files with 9 additions and 5 deletions

View File

@ -127,7 +127,7 @@ class MessageCache extends Observer {
} }
const buffer = await Util.downloadAsBuffer(attachment.proxyURL || attachment.url).catch((err) => { const buffer = await Util.downloadAsBuffer(attachment.proxyURL || attachment.url).catch((err) => {
this.client.logger.error(`Failed to download buffer for "${chalk.bold(data.name)}".\n${err.stack || err}`); this.client.logger.error(`Failed to download buffer for "${chalk.bold(data.name)}".\n${err.stack || err}\nhttps://discord.com/channels/${message.guild.id}/${message.channel.id}/${message.id}`);
return null; return null;
}); });
@ -140,7 +140,7 @@ class MessageCache extends Observer {
data.index = result?.insertedId; data.index = result?.insertedId;
} else { } else {
//Upload using GridFS, not a priority right now. //Upload using GridFS, not a priority right now.
this.client.logger.error(`Temporary logging; attachment "${chalk.bold(data.name)}" exceeds 15mb.`); //this.client.logger.error(`Temporary logging; attachment "${chalk.bold(data.name)}" exceeds 15mb.`);
} }
} }

View File

@ -52,10 +52,10 @@ class Command extends Component {
execute() { execute() {
throw new Error(`${this.resolveable} is missing an execute function.`); throw new Error(`${this.resolveable} is missing an execute function.`);
} }
get moduleResolveable() { async checkPermissions() {
return `${this.module.id}:${this.id}`; //NOTE: Todo (move from permissions inhibitor)
} }
usageEmbed(message, verbose = false) { usageEmbed(message, verbose = false) {
@ -108,6 +108,10 @@ class Command extends Component {
} }
get moduleResolveable() {
return `${this.module.id}:${this.id}`;
}
} }
module.exports = Command; module.exports = Command;