Files
tweetdistributor/main.go
sirrow aea31da9c0 Init
Just read from discord channel
2025-03-15 17:38:20 +09:00

22 lines
346 B
Go

package main
import (
"fmt"
"os"
"tweetdistributor/discord"
)
func main() {
fmt.Println("Hello, World!")
d := discord.Discord(os.Getenv("DISCORD_TOKEN"), os.Getenv("DISCORD_CHANNEL"))
tweetchannel := make(chan string, 1)
d.BeginRead(tweetchannel)
d.Write("Hello, World!")
for tweet := range tweetchannel {
fmt.Println(tweet)
}
}