diff options
| author | ilotterytea <iltsu@alright.party> | 2025-10-13 01:21:03 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-10-13 01:21:03 +0500 |
| commit | d6196a61348dbd0040e332147ef4a34ade64b309 (patch) | |
| tree | 9625323110735f73c1219e3a0330be5e0ed4028e | |
| parent | 6ddee564ca6184cd6840001a7719c5347516aca1 (diff) | |
fix: ignore empty words
| -rw-r--r-- | internal/handlers.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/handlers.go b/internal/handlers.go index 657b370..b43b58f 100644 --- a/internal/handlers.go +++ b/internal/handlers.go @@ -60,6 +60,11 @@ func HandleMessageEvent(channel string, user twitch.User, message twitch.Message parts := strings.Split(message.Text, " ") for _, part := range parts { + part = strings.TrimSpace(part) + if len(part) == 0 { + continue + } + // word var wordId int64 err = db.QueryRow( |
