From 8a12ddabc26db527770a8f39a65eb5283a3f7686 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Wed, 21 May 2025 17:12:14 +0200 Subject: [PATCH] Fix: bot timer can't be negative or null. --- client/common/configuration/services/channel-details.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/common/configuration/services/channel-details.ts b/client/common/configuration/services/channel-details.ts index d372ca7f..39ba7a6b 100644 --- a/client/common/configuration/services/channel-details.ts +++ b/client/common/configuration/services/channel-details.ts @@ -121,6 +121,15 @@ export class ChannelDetailsService { } } + for (const [i, q] of botConf.quotes.entries()) { + propertiesError[`bot.quotes.${i}.delay`] = [] + if ((typeof q.delay !== 'number') || isNaN(q.delay)) { + propertiesError[`bot.quotes.${i}.delay`].push(ValidationErrorType.WrongFormat) + } else if (q.delay <= 0) { + propertiesError[`bot.quotes.${i}.delay`].push(ValidationErrorType.NotInRange) + } + } + for (const [i, cd] of botConf.commands.entries()) { propertiesError[`bot.commands.${i}.command`] = []