chat queue delay in config

This commit is contained in:
ChomeNS
2023-04-26 15:23:43 +07:00
parent f9d9918e85
commit 895f2abf7e
4 changed files with 19 additions and 12 deletions

View File

@@ -16,6 +16,8 @@ public class Configuration {
@Getter public int reconnectDelay = 2000;
@Getter public int chatQueueDelay = 125;
@Getter public Map<String, String> keys;
@Getter public String weatherApiKey;

View File

@@ -49,7 +49,7 @@ public class ChatPlugin extends Bot.Listener {
chatParsers.add(new KaboomChatParser(bot));
chatParsers.add(new ChomeNSCustomChatParser(bot));
bot.executor().scheduleAtFixedRate(this::sendChatTick, 0, 125, TimeUnit.MILLISECONDS);
bot.executor().scheduleAtFixedRate(this::sendChatTick, 0, bot.config().chatQueueDelay(), TimeUnit.MILLISECONDS);
}
@Override