mirror of
https://github.com/lyx0/ollama-twitch-bot.git
synced 2024-11-06 18:52:03 +01:00
remove leftover code
This commit is contained in:
parent
779cc8650c
commit
7da9f823eb
1 changed files with 0 additions and 6 deletions
6
send.go
6
send.go
|
@ -78,17 +78,12 @@ func (app *application) checkMessage(text string) (bool, string) {
|
|||
}
|
||||
|
||||
// Send is used to send twitch replies and contains the necessary safeguards and logic for that.
|
||||
// Send also logs the twitch.PrivateMessage contents into the database.
|
||||
func (app *application) send(target, message string) {
|
||||
// Message we are trying to send is empty.
|
||||
if len(message) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
if target == "forsen" {
|
||||
return
|
||||
}
|
||||
|
||||
// Since messages starting with `.` or `/` are used for special actions
|
||||
// (ban, whisper, timeout) and so on, we place an emote infront of it so
|
||||
// the actions wouldn't execute. `!` and `$` are common bot prefixes so we
|
||||
|
@ -105,7 +100,6 @@ func (app *application) send(target, message string) {
|
|||
// Twitch has a maximum length for messages of 510 characters so to be safe
|
||||
// we split and check at 500 characters.
|
||||
// https://discuss.dev.twitch.tv/t/missing-client-side-message-length-check/21316
|
||||
// TODO: Make it so it splits at a space instead and not in the middle of a word.
|
||||
if len(message) > 500 {
|
||||
firstMessage := message[0:499]
|
||||
secondMessage := message[499:]
|
||||
|
|
Loading…
Reference in a new issue