From 63818fca3ac54442228cdfe1e6a5df7e422783ad Mon Sep 17 00:00:00 2001 From: Erik Date: Sun, 20 Sep 2020 23:54:33 +0300 Subject: [PATCH] wordfilter lang stuff --- .../languages/en_us/en_us_general.lang | 13 +- .../languages/en_us/en_us_settings.lang | 174 +++++++++++++++++- 2 files changed, 184 insertions(+), 3 deletions(-) diff --git a/structure/language/languages/en_us/en_us_general.lang b/structure/language/languages/en_us/en_us_general.lang index 545b71b..05b0b91 100644 --- a/structure/language/languages/en_us/en_us_general.lang +++ b/structure/language/languages/en_us/en_us_general.lang @@ -149,8 +149,17 @@ Missing `{perms}` permission(s) in {emoji_text-channel}**{channel}**. [ERR_INVALID_TIMESTRING] Invalid timestring provided. Must be `INT unit [INT unit..]`. -[S_AUTOMOD_LENGTH_SUCCESS] -Successfully set the action duration. +[ERR_TIMEOUT] +Action timed out. + +[ERR_CANCEL] +Action aborted. + +[ERR_NAN] +The given value is not a number. + +[ERR_INDEX_OUT_OF_BOUNDS] +The given value is out of bounds. Make sure you're giving a correct number. //Command Handler diff --git a/structure/language/languages/en_us/en_us_settings.lang b/structure/language/languages/en_us/en_us_settings.lang index 8ea3da3..ecb6ee2 100644 --- a/structure/language/languages/en_us/en_us_settings.lang +++ b/structure/language/languages/en_us/en_us_settings.lang @@ -48,6 +48,8 @@ Configure the word filtering behaviour for your server. > Silent means that the bot will not respond in chat. If actions are set in place the bot will DM if possible. +> Actions are managed through a series of prompts. + [S_WORDFILTER_EXPLICIT_ADD] Successfully added `{changed}` to the explicit word filter. @@ -136,8 +138,175 @@ The given infraction is invalid, must be one of `{valid}`. [S_WORDFILTER_ACTION_DELETE] Successfully deleted any actions linked to `{changed}`. +[S_WORDFILTER_ACTION_ADD_START] +You will be asked a series of questions in order to configure the actions. + +What type of action are you adding? +Can be one of `{valid}`. + +> You can cancel this series of prompts by responding with `cancel`. + +[S_WORDFILTER_ACTION_ADD_TIMER] +Would you like the **{action}** to have a timer? +Not assigning a timer will use defaults for the corresponding action. + +Respond with a duration or **n**o. + +[S_WORDFILTER_ACTION_ADD_TIMER_FAIL] +Failed to resolve a valid timestring, skipping this step for now. +You can add a timer with the edit prompts later. + +[S_WORDFILTER_ACTION_ADD_POINTS] +Do you want modpoints to be assigned for these actions? +Actions without assigned points will use default values from modpoints. + +Respond with the amount of points or **n**o. + +[S_WORDFILTER_ACTION_ADD_POINTS_FAIL] +Failed to parse points from your response. +Will use defaults for now. You can edit this later with the edit prompts. + +[S_WORDFILTER_ACTION_ADD_POINTS_RANGE] +The point value you gave was out of range and was capped at **{value}**. + +[S_WORDFILTER_ACTION_ADD_FORCE] +Should the action be forced to bypass automatic infracton escalation? + +Respond with **y**es or **n**o. + +[S_WORDFILTER_ACTION_ADD_PRUNE] +Should the user's recent messages be pruned after being actioned? + +Respond with **y**es or **n**o + +[S_WORDFILTER_ACTION_ADD_TRIGGERS] +Which words should trigger this action? If you want this action to be a generic one (i.e. it is triggered for any filter event that doesn't have a an action tied to it) respond with **gen**eric. +Alternatively you can respond with **ex**plicit, **fuz**zy or **token**ized if you want the action to be tied to a filter list. + +For specific word triggers respond with a list of the words that should trigger it. + +> Words that are not included in a will not trigger any actions as they are not filtered. + +__Letting this prompt time out will make the action a **generic** one.__ + [S_WORDFILTER_ACTION_ADD] -Successfully added a **{type}** action for `word` matches. +Successfully added a **{type}** action for `{trigger}` filter events. +**Duration:** {duration} +**Points:** {points} +**Force:** {force} +**Prune:** {prune} + +[S_WORDFILTER_ACTION_REMOVE_START] +Which action are you looking to remove? +Respond with the corresponding number. + +> This will time out in 60 seconds. +> You can also cancel with `cancel`. + +[S_WORDFILTER_ACTION_PROPERTIES] +**Duration:** {duration} +**Points:** {points} +**Force:** {force} +**Prune:** {prune} +**Trigger:** {trigger} + +[S_WORDFILTER_ACTION_REMOVE] +Successfully removed **{type}** action for `{trigger}` filter events. + +[S_WORDFILTER_ACTIONS_EXISTING] +There is already an action in place for `{trigger}` filter events. +You can either remove or modify it. + +[S_WORDFILTER_WORD_IN_ACTION] +The following words are already tied to an action and were skipped. +`{words}` + +[S_WORDFILTER_INVALID_TRIGGER] +The trigger cannot be left empty! + +[S_WORDFILTER_NOACTIONS] +You haven't configured any filter actions. + +[S_WORDFILTER_CURRENT_ACTIONS] +Currently configured actions for the word filter. + +[S_WORDFILTER_ACTION_EDIT_START] +Which action are you looking to edit? +Respond with the corresponding number. + +> This will time out in 60 seconds. +> You can also cancel with `cancel`. + +[S_WORDFILTER_ACTION_EDIT_SELECT] +Which property of the action are you looking to edit? +Must be one of `{properties}`. + +[S_WORDFILTER_ACTION_EDIT_BADPROP] +Invalid property. + +[S_WORDFILTER_ACTION_EDIT_NEW_VALUE] +What should the new value of `{prop}` be? + +[S_WORDFILTER_ACTION_EDIT_TRIGGER] +Here you can use the following keywords `add`, `remove` and `set` to modify the trigger. + +> Using `reset` doesn't require any further arguments. + +> The `set` keyword requires a new list of trigger words. +> Words that are already present in another action will be skipped. + +> `add` and `remove` and be used in the same response. +> **Ex.** `add word1 word2 word3 remove word1 word4 word6` will first add word1, word2 and word3 and then remove word1, word4 and word6. + +**To change the trigger to be `generic`, `explicit`, `fuzzy` or `tokenized` simply respond with one of them.** +**Using `set`, `add` or `remove` on one of the generic triggers will convert the trigger to a list of words.** + +__This prompt will time out in 2 minutes.__ + +[S_WORDFILTER_ACTION_EDIT_INVALID] +Invalid response. +Must start with `add`, `remove`, `set`, `generic`, `explicit`, `fuzzy` or `tokenized`. + +[S_WORDFILTER_ACTION_EDIT] +Successfully edited action **{type}**. +**Duration:** {duration} +**Points:** {points} +**Force:** {force} +**Prune:** {prune} +**Trigger:** {trigger} + +[S_WORDFILTER_ACTION_EDIT_DURATION] +Respond with the new duration. +**0** will remove the timer, meaning defaults will be used if permanent mutes are disabled. + +[S_WORDFILTER_ACTION_EDIT_DURATION_ERR] +Cannot edit duration for a **{action}** action. + +[S_WORDFILTER_ACTION_EDIT_DURATION_ERR2] +Failed to parse a valid timestring. + +[S_WORDFILTER_ACTION_EDIT_BOOL] +Should **{prop}** be used with the action? +Respond with **y**es or **n**o. + +[S_WORDFILTER_ACTION_EDIT_BOOL_INVALID] +The supplied value could not be resolved to a boolean. + +[S_WORDFILTER_ACTION_EDIT_POINTS_DISABLED] +Cannot configure modpoints as they are disabled. + +[S_WORDFILTER_ACTION_EDIT_POINTS] +Respond with the new point value. + +[S_WORDFILTER_ACTION_EDIT_POINTS_FAIL] +Failed to parse points. + +[S_WORDFILTER_ACTION_EDIT_TYPE] +Respond with the new action type. +Must be one of `{valid}`. + +[S_WORDFILTER_ACTION_EDIT_INVALID_TYPE] +The supplied action type is invalid. //Protection Setting [S_PROTECTION_DESCRIPTION] @@ -211,6 +380,9 @@ Successfully removed length for **{type}** at **{points} points**. [S_AUTOMOD_USEPREV_TOGGLE] Successfully toggled usage of previous exceeded threshold **{toggle}**. +[S_AUTOMOD_LENGTH_SUCCESS] +Successfully set the action duration. + //moderationPoints Setting [S_MODERATIONPOINTS_DESCRIPTION] Configure points and point expiration for infractions. Utilized by auto-moderation.