mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-13 21:57:18 +00:00
Make naming uniform with delete_with_command
This commit is contained in:
parent
acf747dd23
commit
8f5354d13c
2 changed files with 5 additions and 5 deletions
|
@ -30,7 +30,7 @@ const defaultOptions: PluginOptions<TagsPluginType> = {
|
|||
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<TagsPluginType>()("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<TagsPluginType>()("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 <categories/${name}>`,
|
||||
]);
|
||||
|
|
|
@ -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),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue