remove leftover code

This commit is contained in:
lyx0 2024-03-05 22:36:28 +01:00
parent 779cc8650c
commit 7da9f823eb

View file

@ -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 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) { func (app *application) send(target, message string) {
// Message we are trying to send is empty. // Message we are trying to send is empty.
if len(message) == 0 { if len(message) == 0 {
return return
} }
if target == "forsen" {
return
}
// Since messages starting with `.` or `/` are used for special actions // Since messages starting with `.` or `/` are used for special actions
// (ban, whisper, timeout) and so on, we place an emote infront of it so // (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 // 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 // Twitch has a maximum length for messages of 510 characters so to be safe
// we split and check at 500 characters. // we split and check at 500 characters.
// https://discuss.dev.twitch.tv/t/missing-client-side-message-length-check/21316 // 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 { if len(message) > 500 {
firstMessage := message[0:499] firstMessage := message[0:499]
secondMessage := message[499:] secondMessage := message[499:]