Aucune description

Bruce Marriner e8b77083df Inital implementation for callback funcs handling Websocket events il y a 9 ans
examples 778a62b747 renamed examples folder. il y a 9 ans
LICENSE bc323b57a1 Initial commit il y a 9 ans
README.md 14dc3f3e79 Proper GFM. il y a 9 ans
channel.go e6789fde74 Inital add of Websockets il y a 9 ans
discord.go a5d3e9378e Made session in Discord strut a pointer. Probably will change that again :) il y a 9 ans
restapi.go c858d08208 Fixed login, so it works :) il y a 9 ans
server.go e6789fde74 Inital add of Websockets il y a 9 ans
session.go e8b77083df Inital implementation for callback funcs handling Websocket events il y a 9 ans
structs.go 2c3ca777f9 Clean up, notes il y a 9 ans
users.go 2c3ca777f9 Clean up, notes il y a 9 ans
util.go 2c3ca777f9 Clean up, notes il y a 9 ans
wsapi.go e8b77083df Inital implementation for callback funcs handling Websocket events il y a 9 ans

README.md

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