Tidak Ada Deskripsi

Bruce Marriner 4cb734f809 Fixed AU_ consts 9 tahun lalu
examples 778a62b747 renamed examples folder. 9 tahun lalu
LICENSE bc323b57a1 Initial commit 9 tahun lalu
README.md 14dc3f3e79 Proper GFM. 9 tahun lalu
channel.go e6789fde74 Inital add of Websockets 9 tahun lalu
discord.go 0840d1003d Removed endpoint variables and moved to restapi.go 9 tahun lalu
restapi.go 4cb734f809 Fixed AU_ consts 9 tahun lalu
server.go e6789fde74 Inital add of Websockets 9 tahun lalu
session.go 2c3ca777f9 Clean up, notes 9 tahun lalu
structs.go 2c3ca777f9 Clean up, notes 9 tahun lalu
users.go 2c3ca777f9 Clean up, notes 9 tahun lalu
util.go 2c3ca777f9 Clean up, notes 9 tahun lalu
wsapi.go 2c3ca777f9 Clean up, notes 9 tahun lalu

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