(Golang) Go bindings for Discord
Find a file
Bruce Marriner fcf2f62b2c Typo.
2015-11-07 11:59:35 -06:00
_examples Added SendMessage function to client.go and example of it to demo.go 2015-11-03 11:25:22 -06:00
channel.go Created a client.go with low level access functions and started 2015-11-03 08:35:58 -06:00
client.go Updated Request func to handle POST as well. Updated other 2015-11-07 11:48:27 -06:00
discord.go Renamed RequestToken to Login 2015-11-03 08:51:21 -06:00
LICENSE Initial commit 2015-11-01 14:51:01 -06:00
notes.md Added Message func to client.go to pull channel messages 2015-11-03 10:56:09 -06:00
README.md Typo. 2015-11-07 11:59:35 -06:00
server.go Created a client.go with low level access functions and started 2015-11-03 08:35:58 -06:00
session.go Renamed Close to Logout. Removed unneeded sprintf calls. 2015-11-03 09:28:15 -06:00
structs.go Removed Mentions struct, as its the same as User 2015-11-07 11:31:46 -06:00

Discordgo

Golang Discord API.

This is my first Golang project and it is probably not maybe even suitable for use :)

Everything here so far is likely to change as I learn Golang better and refine the API names and such.

Initially my goal was to write a chatbot and I started working with https://github.com/Xackery/discord as my API. But that code doesn't work 100% and so I started slowly making changes to it. Anyhow, credit goes to https://github.com/Xackery/discord for getting me started.

If you're looking for a functional Discord API for Golang check out https://github.com/gdraynz/go-discord which I recently found. It's much more complete and will likely help me learn how to improve what I have here.

What Works

Right now I'm focusing on the REST API and have not done any Websockets work. You can do the following things using the client.go functions.

  • Login to Discord
  • Get User information for a given user.
  • Get Private Channels (used for Private Messages) for a given user.
  • Get Servers for a given user.
  • Get Members of a given Server
  • Get Channels for a given Server
  • Get Messages for a given Channel
  • Send Messages to a given Channel
  • Logout from Discord.

All the code in the other files such as discord.go, session.go, etc are a playground where I'm working to provide another and easier way to access the API.

You can look at the demo.go example file to see all of the client.go functions in use.

Other Discord APIs