From 7626d1e51bded04c0e61e64e02912d52178793bf Mon Sep 17 00:00:00 2001 From: Eduardo Date: Thu, 28 Mar 2024 20:38:11 +0100 Subject: [PATCH] clean the text before conversation --- telegram.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/telegram.go b/telegram.go index 4dc9108..e4705d9 100644 --- a/telegram.go +++ b/telegram.go @@ -128,6 +128,12 @@ func handleCommand(chatId int64, command string) error { func handleConversation(chatId int64, text string) error { var err error + + // Clean up the text + text = removeCommand(text) + text = normaliceString(text) + text = removePunctuation(text) + text = trimMultipleSpaces(text) text = strings.ToLower(text) var regexIssue = regexp.MustCompile(`(?i)\bIssue\b`) -- 2.30.2