From 8f5354d13c4bdd839b64c2bcbbaa4cbf31c91b03 Mon Sep 17 00:00:00 2001 From: Dark <7890309+DarkView@users.noreply.github.com> Date: Tue, 22 Dec 2020 04:14:12 +0100 Subject: [PATCH] Make naming uniform with delete_with_command --- backend/src/plugins/Tags/TagsPlugin.ts | 6 +++--- backend/src/plugins/Tags/types.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/plugins/Tags/TagsPlugin.ts b/backend/src/plugins/Tags/TagsPlugin.ts index 771be515..b7b146f3 100644 --- a/backend/src/plugins/Tags/TagsPlugin.ts +++ b/backend/src/plugins/Tags/TagsPlugin.ts @@ -30,7 +30,7 @@ const defaultOptions: PluginOptions = { global_tag_cooldown: null, user_cooldown: null, global_cooldown: null, - global_delete_invoke: false, + auto_delete_command: false, categories: {}, @@ -74,7 +74,7 @@ export const TagsPlugin = zeppelinGuildPlugin()("tags", { }, configPreprocessor(options) { - if (options.config.delete_with_command && options.config.global_delete_invoke) { + if (options.config.delete_with_command && options.config.auto_delete_command) { throw new StrictValidationError([ `Cannot have both (global) delete_with_command and global_delete_invoke enabled`, ]); @@ -84,7 +84,7 @@ export const TagsPlugin = zeppelinGuildPlugin()("tags", { if (options.config?.categories) { for (const [name, opts] of Object.entries(options.config.categories)) { const cat = options.config.categories[name]; - if (cat.delete_with_command && cat.category_delete_invoke) { + if (cat.delete_with_command && cat.auto_delete_command) { throw new StrictValidationError([ `Cannot have both (category specific) delete_with_command and category_delete_invoke enabled at `, ]); diff --git a/backend/src/plugins/Tags/types.ts b/backend/src/plugins/Tags/types.ts index 90092b87..15b0ce5b 100644 --- a/backend/src/plugins/Tags/types.ts +++ b/backend/src/plugins/Tags/types.ts @@ -16,7 +16,7 @@ export const TagCategory = t.type({ user_category_cooldown: tNullable(t.union([t.string, t.number])), // Per user, per tag category global_tag_cooldown: tNullable(t.union([t.string, t.number])), // Any user, per tag global_category_cooldown: tNullable(t.union([t.string, t.number])), // Any user, per category - category_delete_invoke: tNullable(t.boolean), // Any tag, per tag category + auto_delete_command: tNullable(t.boolean), // Any tag, per tag category tags: t.record(t.string, Tag), @@ -32,7 +32,7 @@ export const ConfigSchema = t.type({ global_tag_cooldown: tNullable(t.union([t.string, t.number])), // Any user, per tag user_cooldown: tNullable(t.union([t.string, t.number])), // Per user global_cooldown: tNullable(t.union([t.string, t.number])), // Any tag use - global_delete_invoke: t.boolean, // Any tag + auto_delete_command: t.boolean, // Any tag categories: t.record(t.string, TagCategory),