spawn a new goroutine for the ()dl command and for sending messages

This commit is contained in:
lyx0 2023-10-03 19:33:31 +02:00
parent 230aa530eb
commit 126fb7c1e9

View file

@ -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
}
}