Init
Just read from discord channel
This commit is contained in:
21
main.go
Normal file
21
main.go
Normal file
@@ -0,0 +1,21 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user