Merge branch 'slash-commands' of https://github.com/GalacticBot/New-GBot into slash-commands
This commit is contained in:
commit
aee6d87574
@ -350,6 +350,9 @@ __Letting this prompt time out will make the action a **generic** one.__
|
||||
The following words are already tied to an action and were skipped.
|
||||
`{words}`
|
||||
|
||||
[SETTING_WORDFILTER_INVALID]
|
||||
No valid values supplied.
|
||||
|
||||
// Linkfilter
|
||||
[SETTING_LINKFILTER_HELP]
|
||||
Configure the link filtering behaviour for your server.
|
||||
|
@ -135,8 +135,9 @@ class WordFilterSetting extends FilterSetting {
|
||||
}
|
||||
if (params.length && invalid.length) index += '_SOME';
|
||||
} else if (list === 'presets') {
|
||||
for (const word of words) {
|
||||
if (FilterPresets.regex[word]) params.push(FilterPresets.regex[word]);
|
||||
for (let word of words) {
|
||||
word = word.toLowerCase();
|
||||
if (FilterPresets.regex[word]) params.push(...FilterPresets.regex[word]);
|
||||
else invalid.push(word);
|
||||
}
|
||||
list = 'regex';
|
||||
@ -147,7 +148,7 @@ class WordFilterSetting extends FilterSetting {
|
||||
if (!params.length) {
|
||||
if (['roles', 'channels'].includes(list.value))
|
||||
return { error: true, index: 'RESOLVE_FAIL', params: { type: list === 'bypass' ? 'roles' : 'channels' } };
|
||||
return { error: true, index };
|
||||
return { error: true, index: 'SETTING_WORDFILTER_INVALID' };
|
||||
}
|
||||
const { modified } = this[method](setting[list], params.map((o) => o.id || o));
|
||||
return { index, params: { updated: list, modified: params.filter((o) => modified.includes(o.id || o)).map((o) => o.name || o).join('__, __'), invalid: invalid.join('`, `') } };
|
||||
|
Loading…
Reference in New Issue
Block a user