Lang entries, mute error handling
This commit is contained in:
parent
76b44e1b71
commit
88b1d871bc
@ -3,7 +3,9 @@
|
|||||||
"shardOptions": {
|
"shardOptions": {
|
||||||
"totalShards": "auto",
|
"totalShards": "auto",
|
||||||
"respawn": true,
|
"respawn": true,
|
||||||
"execArgv": ["--enable-source-maps"]
|
"execArgv": [
|
||||||
|
"--enable-source-maps"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"discord": {
|
"discord": {
|
||||||
"prefix": "!",
|
"prefix": "!",
|
||||||
|
@ -304,7 +304,9 @@ class MuteSetting extends Setting
|
|||||||
return { index: 'SETTING_MUTE_ABORT', error: true };
|
return { index: 'SETTING_MUTE_ABORT', error: true };
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
invoker.editReply({ content: 'Working...', emoji: 'working' });
|
invoker.editReply({ content: 'Working...', emoji: 'working' });
|
||||||
|
}
|
||||||
|
|
||||||
if (!role)
|
if (!role)
|
||||||
{
|
{
|
||||||
@ -358,7 +360,11 @@ class MuteSetting extends Setting
|
|||||||
}
|
}
|
||||||
catch (err)
|
catch (err)
|
||||||
{
|
{
|
||||||
this.client.logger.error(err as Error);
|
const error = err as Error;
|
||||||
|
if (error.message === 'Missing Permissions')
|
||||||
|
issues.push({ type: 'permission', channel: channel.name, permissions: [ 'unknown' ] });
|
||||||
|
else
|
||||||
|
this.client.logger.error('Error during mute role create while creating channel overrides\n', error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,8 +127,10 @@ class MuteInfraction extends Infraction
|
|||||||
catch (e)
|
catch (e)
|
||||||
{
|
{
|
||||||
const err = e as Error;
|
const err = e as Error;
|
||||||
|
if (err.message.includes('Missing Permissions'))
|
||||||
|
return this._fail('COMMAND_MUTE_4FAIL');
|
||||||
this.logger.error(`Mute timeout failed:\n${err.stack || err}`);
|
this.logger.error(`Mute timeout failed:\n${err.stack || err}`);
|
||||||
return this._fail('COMMAND_MUTE_4FAIL');
|
return this._fail('ERR_INTERNAL');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ For a list of all available commands, use `/commands [ group ]`.
|
|||||||
Conflicting names can be prefixed with the component type to specify, e.g. `command:permissions` and `setting:permissions`.
|
Conflicting names can be prefixed with the component type to specify, e.g. `command:permissions` and `setting:permissions`.
|
||||||
|
|
||||||
**❯ Links**
|
**❯ Links**
|
||||||
[Documentation](https://galactic.corgi.wtf/documentation)
|
[Documentation](https://galactic.corgi.wtf/docs)
|
||||||
[Dashboard](https://galactic.corgi.wtf/dashboard) **[NON-FUNCTIONAL PRE-ALPHA]**
|
[Dashboard](https://galactic.corgi.wtf/dashboard) **[NON-FUNCTIONAL PRE-ALPHA]**
|
||||||
[Support & Info server](https://discord.gg/SvJgtEj)
|
[Support & Info server](https://discord.gg/SvJgtEj)
|
||||||
[@BotGalactic Twitter](https://twitter.com/BotGalactic)
|
[@BotGalactic Twitter](https://twitter.com/BotGalactic)
|
||||||
|
@ -36,4 +36,7 @@ The user's role is above the bot's.
|
|||||||
Invalid channel type
|
Invalid channel type
|
||||||
|
|
||||||
[ERR_NOT_IMPLEMENTED]
|
[ERR_NOT_IMPLEMENTED]
|
||||||
This functionality is not implemented yet
|
This functionality is not implemented yet
|
||||||
|
|
||||||
|
[ERR_INTERNAL]
|
||||||
|
Internal error
|
Loading…
Reference in New Issue
Block a user