mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Add postInCaseLog option for mod action Automod actions; allow forcing case log even when log_automatic_actions is disabled
This commit is contained in:
parent
aa43f05173
commit
45e81848a7
7 changed files with 18 additions and 13 deletions
|
@ -62,11 +62,11 @@ export async function createCase(pluginData: GuildPluginData<CasesPluginType>, a
|
|||
|
||||
const config = pluginData.config.get();
|
||||
|
||||
if (
|
||||
config.case_log_channel &&
|
||||
(!args.automatic || config.log_automatic_actions) &&
|
||||
args.postInCaseLogOverride !== false
|
||||
) {
|
||||
const shouldPostToCaseLogChannel =
|
||||
args.postInCaseLogOverride === true ||
|
||||
((!args.automatic || config.log_automatic_actions) && args.postInCaseLogOverride !== false);
|
||||
|
||||
if (config.case_log_channel && shouldPostToCaseLogChannel) {
|
||||
await postCaseToCaseLogChannel(pluginData, createdCase);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue