forked from Galactic/galactic-bot
bugfixes
This commit is contained in:
parent
a5d0479d4e
commit
971b91913b
@ -123,6 +123,7 @@ class CommandHandler extends Observer {
|
|||||||
const { command } = invoker;
|
const { command } = invoker;
|
||||||
if (response.error && response.index) {
|
if (response.error && response.index) {
|
||||||
if (!response.emoji) response.emoji = 'failure';
|
if (!response.emoji) response.emoji = 'failure';
|
||||||
|
if (!response.params) response.params = response.option;
|
||||||
return invoker.reply(response);
|
return invoker.reply(response);
|
||||||
} else if (response.error) {
|
} else if (response.error) {
|
||||||
let content = invoker.format(`O_COMMANDHANDLER_TYPE${response.option.type}`, {
|
let content = invoker.format(`O_COMMANDHANDLER_TYPE${response.option.type}`, {
|
||||||
|
@ -169,7 +169,7 @@ class GuildLogger extends Observer {
|
|||||||
if (missing.length)
|
if (missing.length)
|
||||||
return this.client.emit('logError', { guild: wrapper, logger: 'messageLogger', reason: 'MSGLOG_NO_PERMS', params: { missing: missing.join(', ') } });
|
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);
|
const roles = member.roles.cache.map((r) => r.id);
|
||||||
for (const role of bypass) {
|
for (const role of bypass) {
|
||||||
if (roles.includes(role)) return undefined;
|
if (roles.includes(role)) return undefined;
|
||||||
|
Loading…
Reference in New Issue
Block a user