1
0

slash doesn't play well with new settings, experts say

This commit is contained in:
2022-05-07 11:05:45 +02:00
parent e8d5293911
commit fc1e2424db
2 changed files with 8 additions and 11 deletions

View File

@ -3,7 +3,6 @@ package core
import (
"bytes"
"fmt"
"log"
"math/rand"
"sort"
"strings"
@ -120,13 +119,11 @@ func MessagePing(s *discordgo.Session, m *discordgo.MessageCreate, message strin
// generate TTS version of the message and upload it to the channel
func MessageAudio(s *discordgo.Session, m *discordgo.MessageCreate, message string) {
log.Println("Messageaudio :", message)
var cleanMessage string = prepareTTSMessage(message)
filename, out := getAudioMessage(cleanMessage)
file := bytes.NewReader(out)
s.ChannelFileSend(m.ChannelID, filename, file)
// delete the receveid command after processing it. less clutter
log.Println("Messageaudio :", cleanMessage)
s.ChannelMessageDelete(m.ChannelID, m.ID)
}