add twitter

This commit is contained in:
2025-03-15 19:07:16 +09:00
parent aea31da9c0
commit ac532ddcb5
4 changed files with 63 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"os"
"tweetdistributor/discord"
"tweetdistributor/output"
)
func main() {
@@ -13,9 +14,10 @@ func main() {
tweetchannel := make(chan string, 1)
d.BeginRead(tweetchannel)
d.Write("Hello, World!")
output := output.TwitterOutput(os.Getenv("TW_ACCESS_TOKEN"), os.Getenv("TW_ACCESS_SECRET"))
for tweet := range tweetchannel {
fmt.Println(tweet)
output.Write(tweet)
}
}