add twitter
This commit is contained in:
4
main.go
4
main.go
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user