misc fixes
This commit is contained in:
parent
badbafa844
commit
5b9382b529
@ -34,14 +34,13 @@ class WelcomerSetting extends Setting {
|
||||
const { guild } = message;
|
||||
const setting = guild._settings[this.index] || this.default[this.index];
|
||||
const { resolver } = this.client;
|
||||
const response = await resolver.resolveMethod(params);
|
||||
const langParams = {};
|
||||
let index = null;
|
||||
|
||||
if(resolver.resolveBoolean(params[0]) !== null) {
|
||||
setting.enabled = resolver.resolveBoolean(params[0]);
|
||||
index = 'S_WELCOMER_TOGGLE';
|
||||
langParams.toggle = message.format('ON_OFF_TOGGLE', { toggle: setting.enabled }, true)
|
||||
langParams.toggle = message.format('ON_OFF_TOGGLE', { toggle: setting.enabled }, true);
|
||||
} else {
|
||||
setting.message = message.content.replace(guild.prefix, '').replace(message._caller, '').replace(message._settingCaller, '').trim();
|
||||
index = 'S_WELCOMER_SET';
|
||||
@ -66,10 +65,10 @@ class WelcomerSetting extends Setting {
|
||||
},
|
||||
{
|
||||
name: '》Message',
|
||||
value: setting.message.substring(0,1021) + setting.message.length > 1021 ? '...' : '',
|
||||
value: `\`${setting.message.substring(0, 1021)}${setting.message.length > 1021 ? '...' : ''}\``,
|
||||
inline: false
|
||||
}
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user