forked from Galactic/galactic-bot
error logger stuff
This commit is contained in:
parent
aad858a510
commit
8a8a1f28e6
@ -1,3 +1,4 @@
|
|||||||
|
const { Util } = require("../../../utilities");
|
||||||
const { Observer } = require("../../interfaces");
|
const { Observer } = require("../../interfaces");
|
||||||
|
|
||||||
const COLOURS = {
|
const COLOURS = {
|
||||||
@ -19,7 +20,8 @@ class ErrorLog extends Observer {
|
|||||||
['wordWatcherError', this.wordWatcher.bind(this)],
|
['wordWatcherError', this.wordWatcher.bind(this)],
|
||||||
['logError', this.logError.bind(this)],
|
['logError', this.logError.bind(this)],
|
||||||
['utilityError', this.utilityError.bind(this)],
|
['utilityError', this.utilityError.bind(this)],
|
||||||
['linkFilterWarn', this.linkFilterWarn.bind(this)]
|
['linkFilterWarn', this.linkFilterWarn.bind(this)],
|
||||||
|
['filterMissingPermissions', this.filterMissingPermissions.bind(this)]
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -136,6 +138,17 @@ class ErrorLog extends Observer {
|
|||||||
this.post(guild, embed, 'linkFilterWarn');
|
this.post(guild, embed, 'linkFilterWarn');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
filterMissingPermissions({ guild, filter, permissions, channel }) {
|
||||||
|
const embed = {
|
||||||
|
description: guild.format(`FILTER_MISSING_PERMISSIONS`, {
|
||||||
|
filter: Util.capitalise(filter),
|
||||||
|
channel: channel.name,
|
||||||
|
permissions: permissions.join(', ')
|
||||||
|
})
|
||||||
|
};
|
||||||
|
this.post(guild, embed, 'filterMissingPermissions');
|
||||||
|
}
|
||||||
|
|
||||||
async post(guild, embed, type) {
|
async post(guild, embed, type) {
|
||||||
const settings = await guild.settings();
|
const settings = await guild.settings();
|
||||||
const { errors } = settings;
|
const { errors } = settings;
|
||||||
|
Loading…
Reference in New Issue
Block a user