or The only Discord library that doesn't start with a D
API calls largely inspired by the Discord python client discord.py. (thanks)
Some methods may be pretty chaotic but I'm no Go expert and hope it will do for now.
An usage example can be found in the main.go
file.
import (
"log"
"github.com/gdraynz/go-discord/discord"
)
func messageReceived(message discord.Message) {
log.Printf("%s : %s",
message.Author.Name,
message.Content,
)
}
func main() {
client := discord.Client{
OnMessageReceived: messageReceived,
}
if err := client.Login("email", "password"); err != nil {
log.Fatal(err)
}
client.Run()
}
I'm not putting a lot of time on it, here are many other implementations in different languages :