From d77105c831e8d3bcc24de81971e1db2bb6587e89 Mon Sep 17 00:00:00 2001 From: Dragory Date: Sat, 13 Apr 2019 01:56:11 +0300 Subject: [PATCH] Slowmode: support native slowmode up to 6h --- src/plugins/Slowmode.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/Slowmode.ts b/src/plugins/Slowmode.ts index 31f5d7e8..00a9e882 100644 --- a/src/plugins/Slowmode.ts +++ b/src/plugins/Slowmode.ts @@ -7,6 +7,8 @@ import { ZeppelinPlugin } from "./ZeppelinPlugin"; import { SavedMessage } from "../data/entities/SavedMessage"; import { GuildSavedMessages } from "../data/GuildSavedMessages"; +const NATIVE_SLOWMODE_LIMIT = 6 * 60 * 60 * 1000; // 6 hours + interface ISlowmodePluginConfig { use_native_slowmode: boolean; @@ -233,7 +235,7 @@ export class SlowmodePlugin extends ZeppelinPlugin { } const seconds = Math.ceil(convertDelayStringToMS(args.time) / 1000); - const useNativeSlowmode = this.getConfigForChannel(channel).use_native_slowmode && seconds <= 120; + const useNativeSlowmode = this.getConfigForChannel(channel).use_native_slowmode && seconds <= NATIVE_SLOWMODE_LIMIT; if (useNativeSlowmode) { // Native slowmode