From a5c8808d49c505a8313a26e4a99c642166beef80 Mon Sep 17 00:00:00 2001 From: Gustav Date: Mon, 3 Jul 2023 12:11:57 +0200 Subject: [PATCH] Debounce dictionary plugin --- Pinpoint.Plugin.Dictionary/DictionaryPlugin.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Pinpoint.Plugin.Dictionary/DictionaryPlugin.cs b/Pinpoint.Plugin.Dictionary/DictionaryPlugin.cs index f8de1bd..43b73b4 100644 --- a/Pinpoint.Plugin.Dictionary/DictionaryPlugin.cs +++ b/Pinpoint.Plugin.Dictionary/DictionaryPlugin.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Net.Http; using System.Runtime.CompilerServices; using System.Text.RegularExpressions; using System.Threading; @@ -23,6 +22,8 @@ public class DictionaryPlugin : IPlugin public PluginStorage Storage { get; set; } = new(); + public TimeSpan DebounceTime => TimeSpan.FromMilliseconds(200); + public async Task Activate(Query query) { return query.Parts.Length == 2 && DefineRegex.IsMatch(query.Parts[0]);