This commit is contained in:
Erik 2022-09-06 13:12:16 +03:00
parent a5d0479d4e
commit 971b91913b
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
2 changed files with 3 additions and 2 deletions

View File

@ -123,6 +123,7 @@ class CommandHandler extends Observer {
const { command } = invoker;
if (response.error && response.index) {
if (!response.emoji) response.emoji = 'failure';
if (!response.params) response.params = response.option;
return invoker.reply(response);
} else if (response.error) {
let content = invoker.format(`O_COMMANDHANDLER_TYPE${response.option.type}`, {

View File

@ -169,7 +169,7 @@ class GuildLogger extends Observer {
if (missing.length)
return this.client.emit('logError', { guild: wrapper, logger: 'messageLogger', reason: 'MSGLOG_NO_PERMS', params: { missing: missing.join(', ') } });
if (bypass.length && message?.member.roles.cache.size) {
if (bypass.length && message.member?.roles.cache.size) {
const roles = member.roles.cache.map((r) => r.id);
for (const role of bypass) {
if (roles.includes(role)) return undefined;