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 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:]