3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Fix error when parsing a spam plugin mute time that is of type number

This commit is contained in:
Dragory 2019-04-14 20:11:31 +03:00
parent f5de7db971
commit 3643c319d4

View file

@ -241,7 +241,9 @@ export class SpamPlugin extends ZeppelinPlugin<ISpamPluginConfig> {
// Start by muting them, if enabled
let muteResult: MuteActionResult;
if (spamConfig.mute && member) {
const muteTime = spamConfig.mute_time ? convertDelayStringToMS(spamConfig.mute_time) : 120 * 1000;
const muteTime = spamConfig.mute_time
? convertDelayStringToMS(spamConfig.mute_time.toString())
: 120 * 1000;
muteResult = await this.actions.fire("mute", {
member,
muteTime,