بدون توضیح

Bruce Marriner 1505c7ede6 Updated Guild struct, fixed embed_channel_id to be a int from string. 10 سال پیش
examples 778a62b747 renamed examples folder. 10 سال پیش
LICENSE bc323b57a1 Initial commit 10 سال پیش
README.md 666adbe0b4 Updated readme. 10 سال پیش
channel.go 074d1bcdae Huge update to Websocket support. 10 سال پیش
discord.go f4445fb782 Commented out file, as it's not being used now. 10 سال پیش
guild.go 1505c7ede6 Updated Guild struct, fixed embed_channel_id to be a int from string. 10 سال پیش
restapi.go 3794c1a31e Added Guild Role Update handler 10 سال پیش
session.go 3794c1a31e Added Guild Role Update handler 10 سال پیش
structs.go 2c3ca777f9 Clean up, notes 10 سال پیش
users.go 3d9e980619 Several bug fixes causing json unmarshal errors. 10 سال پیش
util.go 2c3ca777f9 Clean up, notes 10 سال پیش
wsapi.go 3794c1a31e Added Guild Role Update handler 10 سال پیش

README.md

Discordgo

Discord API for Golang

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

Everything here so far is likely to change as I learn Golang better and refine the API names and such. Because of that I do not yet recommend this for use with anything super important :)

Initially my goal was to write a chatbot and I started working with https://github.com/Xackery/discord as my API. But that code didn't work 100% at the time. So I started slowly making changes to it and eventually ended up with something entirely different. Anyhow, credit goes to https://github.com/Xackery/discord for getting me started.

If you're looking for a more 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

Low level functions exist for the core REST API and Websocket API.

  • 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
  • Start a Websocket connection and listen for and handle events.
  • Logout from Discord.

Other Discord APIs