From 126fb7c1e9b0cdbc5005e361f8e0c4cdebd9ab4e Mon Sep 17 00:00:00 2001 From: lyx0 Date: Tue, 3 Oct 2023 19:33:31 +0200 Subject: [PATCH] spawn a new goroutine for the ()dl command and for sending messages --- cmd/nourybot/commands.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/nourybot/commands.go b/cmd/nourybot/commands.go index d2e7ab0..ed7a777 100644 --- a/cmd/nourybot/commands.go +++ b/cmd/nourybot/commands.go @@ -84,7 +84,7 @@ func (app *application) handleCommand(message twitch.PrivateMessage) { } case "dl": - commands.Download(target, cmdParams[1], fileUploaderURL, app.TwitchClient, app.Log) + go commands.Download(target, cmdParams[1], fileUploaderURL, app.TwitchClient, app.Log) case "mail": app.SendEmail("Test command used!", "This is an email test") @@ -186,7 +186,7 @@ func (app *application) handleCommand(message twitch.PrivateMessage) { } } if reply != "" { - app.Send(target, reply) + go app.Send(target, reply) return } }