This commit is contained in:
Erik 2022-08-31 19:07:19 +03:00
parent 0a9e688e1f
commit b2252329e8
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
2 changed files with 6 additions and 5 deletions

View File

@ -707,7 +707,7 @@ class GuildLogger extends Observer {
const missing = logChannel.permissionsFor(this.client.user).missing(['ViewChannel', 'EmbedLinks', 'SendMessages']); const missing = logChannel.permissionsFor(this.client.user).missing(['ViewChannel', 'EmbedLinks', 'SendMessages']);
if (missing.length) if (missing.length)
return this.client.emit('logError', { guild: wrapper, logger: 'vcLogger', reason: 'MEMBERLOG_NO_PERMS', params: { missing: missing.join(', ') } }); return this.client.emit('logError', { guild: wrapper, logger: 'memberLogger', reason: 'MEMBERLOG_NO_PERMS', params: { missing: missing.join(', ') } });
let { join: joinMessage } = setting; let { join: joinMessage } = setting;
joinMessage = this._replaceTags(joinMessage, member); joinMessage = this._replaceTags(joinMessage, member);
@ -727,7 +727,7 @@ class GuildLogger extends Observer {
const missing = logChannel.permissionsFor(this.client.user).missing(['ViewChannel', 'EmbedLinks', 'SendMessages']); const missing = logChannel.permissionsFor(this.client.user).missing(['ViewChannel', 'EmbedLinks', 'SendMessages']);
if (missing.length) if (missing.length)
return this.client.emit('logError', { guild: wrapper, logger: 'vcLogger', reason: 'MEMBERLOG_NO_PERMS', params: { missing: missing.join(', ') } }); return this.client.emit('logError', { guild: wrapper, logger: 'memberLogger', reason: 'MEMBERLOG_NO_PERMS', params: { missing: missing.join(', ') } });
let { leave: leaveMessage } = setting; let { leave: leaveMessage } = setting;
leaveMessage = this._replaceTags(leaveMessage, member); leaveMessage = this._replaceTags(leaveMessage, member);
@ -749,7 +749,7 @@ class GuildLogger extends Observer {
const missing = logChannel.permissionsFor(this.client.user).missing(['ViewChannel', 'EmbedLinks', 'SendMessages']); const missing = logChannel.permissionsFor(this.client.user).missing(['ViewChannel', 'EmbedLinks', 'SendMessages']);
if (missing.length) if (missing.length)
return this.client.emit('logError', { guild: wrapper, logger: 'vcLogger', reason: 'NICKLOG_NO_PERMS', params: { missing: missing.join(', ') } }); return this.client.emit('logError', { guild: wrapper, logger: 'memberLogger', reason: 'NICKLOG_NO_PERMS', params: { missing: missing.join(', ') } });
const oldNick = oldMember.nickname || oldMember.user.username; const oldNick = oldMember.nickname || oldMember.user.username;
const newNick = newMember.nickname || newMember.user.username; const newNick = newMember.nickname || newMember.user.username;

View File

@ -85,7 +85,7 @@ class SettingsMigrator {
if (overrideRoles.length) { if (overrideRoles.length) {
if (!translated.ignore) { if (!translated.ignore) {
translated.ignore = { bypass: overrideRoles }; translated.ignore = { bypass: overrideRoles, channels: [] };
} else if (!translated.ignore.bypass) translated.ignore.bypass = overrideRoles; } else if (!translated.ignore.bypass) translated.ignore.bypass = overrideRoles;
else translated.ignore.bypass.push(...overrideRoles); else translated.ignore.bypass.push(...overrideRoles);
} }
@ -299,7 +299,8 @@ class SettingsMigrator {
}; };
if (ignore) settings.ignore = { if (ignore) settings.ignore = {
channels: result.ignore || [] channels: result.ignore || [],
bypass: []
}; };
if (chatlogs) settings.messages = { if (chatlogs) settings.messages = {