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