# README
Discord client for Go
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.
Basic usage
package main
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()
}
Go-bot
Current state
go-bot is the experiment that drives the developement of go-discord
.
It currently handles some fun features :
!go played
: Gobot listen to each presence update and increment the playtime of users on its servers!go reminder <time XhYmZs> [<message>]
: Set up a timer and simply ping the user after the specified time!go twitch <game>
: Send the most watched twitch stream on the given game
Todo
- Most of the audio functionalities have been worked on by many others libraries and integrated into Go by discordgo. I will try to integrate these into go-discord as soon as possible.
Related libraries
I'm not putting a lot of time on go-discord
, here are many other implementations in different languages :
- discord.py (Python)
- discord.js (JS)
- discord.io (JS)
- Discord.NET (C#)
- DiscordSharp (C#)
- Discord4J (Java)
- discordrb (Ruby)
- Discordgo (Go)
- discord (Go)