Documentation
¶
Overview ¶
Package wumpus provides lightweight wrappers over Discord's REST and Gateway APIs.
Be warned that the REST wrapper is not intended to be used directly on Discord's REST API; but rather with a REST proxy such as [blaze](https://github.com/yuki-bot/blaze)
This is intentional; since workers are incapable of handling ratelimits themselves, I outsource this behavior directly to the proxy
Note that most of this package will be incomplete abstractions over Discord's API. This is intentional; I am only implementing models as necessary for my bots to function. Should you need a model that is not included here, feel free to fork out or submit a merge request
This is not intended to be a fully functional Discord wrapper - see [discordgo](https://github.com/bwmarrin/discordgo) for that instead
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateMessageArgs ¶
type CreateMessageArgs struct { Content string `json:"content,omitempty"` Embed interface{} `json:"embed,omitempty"` }
CreateMessageArgs contains additional fields to create a message (TODO)
type Discord ¶
type Discord struct {
// contains filtered or unexported fields
}
Discord wraps the Discord REST API (blaze)
Note: This wrapper does NOT provide rate-limiting, you are expected to be using a proxy ala. blaze which provides consolidated ratelimiting
func NewDiscord ¶
NewDiscord creates a new Discord wrapper at the given URL
func (*Discord) CreateMessage ¶
func (d *Discord) CreateMessage(channelID Snowflake, args CreateMessageArgs) (*Message, error)
type Event ¶
type Event struct { Op int `json:"op"` Data json.RawMessage `json:"d"` Type string `json:"t"` }
Event handles a payload from the exchange