forked from Galactic/galactic-bot
bugfixes
This commit is contained in:
parent
ea676845dc
commit
2af1622892
@ -519,7 +519,7 @@ module.exports = class AutoModeration extends Observer {
|
|||||||
filterResult.filter = 'link';
|
filterResult.filter = 'link';
|
||||||
|
|
||||||
if (!silent && perms?.has('SendMessages')) {
|
if (!silent && perms?.has('SendMessages')) {
|
||||||
const res = await this.client.rateLimiter.limitSend(msg.channel, wrapper.format('L_FILTER_DELETE', { user: author.id }), undefined, 'linkFilter');
|
const res = await this.client.rateLimiter.limitSend(channel, wrapper.format('L_FILTER_DELETE', { user: author.id }), undefined, 'linkFilter');
|
||||||
//const res = await msg.formattedRespond(`L_FILTER_DELETE`, { params: { user: author.id } });
|
//const res = await msg.formattedRespond(`L_FILTER_DELETE`, { params: { user: author.id } });
|
||||||
//if (res) res.delete({ timeout: 10000 });
|
//if (res) res.delete({ timeout: 10000 });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -597,7 +597,7 @@ class GuildLogger extends Observer {
|
|||||||
if (img.height && img.width) embed.image = { url: img.url };
|
if (img.height && img.width) embed.image = { url: img.url };
|
||||||
}
|
}
|
||||||
|
|
||||||
await hook.send({ embeds: [embed] }).catch(this.logger.error);
|
await hook.send({ embeds: [embed] }).catch(this.logger.error.bind(this.logger));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -677,6 +677,7 @@ class GuildLogger extends Observer {
|
|||||||
|
|
||||||
await hook.send({ embeds: [embed] }).catch((err) => {
|
await hook.send({ embeds: [embed] }).catch((err) => {
|
||||||
this.logger.error('Error in message edit:\n' + err.stack + `\n${inspect(embed)}`);
|
this.logger.error('Error in message edit:\n' + err.stack + `\n${inspect(embed)}`);
|
||||||
|
if (err.code === 10015) wrapper.updateWebhook('messages');
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,9 @@ class MessageLog extends Setting {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let hook = await guild.getWebhook(this.name);
|
let hook = await guild.getWebhook(this.name);
|
||||||
|
// Ensure the webhook actually exists
|
||||||
|
hook = await this.client.fetchWebhook(hook.id).catch(() => null);
|
||||||
|
|
||||||
if (hook) await hook.edit({ channel });
|
if (hook) await hook.edit({ channel });
|
||||||
else {
|
else {
|
||||||
hook = await channel.createWebhook({
|
hook = await channel.createWebhook({
|
||||||
|
Loading…
Reference in New Issue
Block a user