forked from Galactic/galactic-bot
mention filter setting
This commit is contained in:
parent
343f451541
commit
3a8d089a6b
@ -39,7 +39,7 @@ class MentionFilter extends FilterSetting {
|
||||
type: 'BOOLEAN'
|
||||
}),
|
||||
new CommandOption({
|
||||
name: 'unqiue',
|
||||
name: 'unique',
|
||||
description: 'Mentions for the same user count as one',
|
||||
type: 'BOOLEAN'
|
||||
}),
|
||||
@ -88,7 +88,7 @@ class MentionFilter extends FilterSetting {
|
||||
|
||||
if (method && list) {
|
||||
|
||||
if (list.value === 'actions') this._action(interaction, method.value, setting[list.value]);
|
||||
if (list.value === 'actions') return this._action(interaction, method.value, setting[list.value]);
|
||||
else if (method.value === 'list') return { message: setting[list.value].join(', ') };
|
||||
|
||||
const { guild } = interaction;
|
||||
@ -121,6 +121,11 @@ class MentionFilter extends FilterSetting {
|
||||
|
||||
}
|
||||
|
||||
_createTrigger(message, action, actionObject) {
|
||||
// TODO allow different actions based on amount of mentions
|
||||
actionObject.trigger = 'generic';
|
||||
}
|
||||
|
||||
fields(guild) {
|
||||
const setting = guild._settings[this.name];
|
||||
return [
|
||||
@ -141,7 +146,7 @@ class MentionFilter extends FilterSetting {
|
||||
{
|
||||
name: 'GENERAL_UNIQUE',
|
||||
value: guild.format('GENERAL_STATE', {
|
||||
bool: setting.unique
|
||||
bool: Boolean(setting.unique)
|
||||
}, { code: true }),
|
||||
inline: true
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user