discord-exploits/exploits/twice.go
Schmenn a77abe5c32 switched to embedded files
a giant slice of bytes is never pretty
2021-04-05 14:24:52 +02:00

28 lines
537 B
Go

package exploits
import (
_ "embed" // embed
"fmt"
"github.com/Schmenn/discord-exploits/modules"
"os"
)
//go:embed twice.ogg
var twiceOgg []byte
// RunTwiceAudioTask edits audio file so it plays a different track when played again
func RunTwiceAudioTask(fileName string) {
data, err := os.ReadFile(fileName)
modules.Check(err)
twice := append(twiceOgg, data...)
name := modules.CreateName("ogg")
fmt.Println("Saved video to: " + name)
err = os.WriteFile(name, twice, os.FileMode(0777))
if err != nil {
panic(err)
}
}