Categorygithub.com/bearcherian/discgo
modulepackage
0.2.2
Repository: https://github.com/bearcherian/discgo.git
Documentation: pkg.go.dev

# README

Discgo

A Discord API client library written in Go

This is not a full client, and is intended to provide support for certain Discord API interactions as I have the need. Perhaps in time full support will be added. Contributions are welcome.

Yes, there are other libraries that have been out for a while which are more actively developed, but I have my own reasons and goals for creating this project:

  • Better support for metrics and tracing
  • Better ruser of context
  • Better control of logging and error handling
  • A package structure I like
  • Respect SemVer, even if semantic import versioning sucks
  • Because I want to

Features

  • Separate REST API client and Gateway Clients. Use one or both as you like.
    • although, you'll probably need to use the REST client to initialize the Gateway client
  • Functional options for configuring your client

Using the Gateway Client

TBD

# Functions

DataToStruct takes a JSON marshallable struct and Unmarshals it to the target pointer value.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WithDialer specifies a custom websocket.Dialer to use when connecting to the Discord Gateway.
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
EventApplicationCommandCreate new Slash Command was created.
EventApplicationCommandDelete Slash Command was deleted.
EventApplicationCommandUpdate Slash Command was updated.
EventChannelCreate new guild channel created.
EventChannelDelete channel was deleted.
EventChannelPinsUpdate message was pinned or unpinned.
EventChannelUpdate channel was updated.
EventGuildBanAdd user was banned from a guild.
EventGuildBanRemove user was unbanned from a guild.
EventGuildCreate lazy-load for unavailable guild.
EventGuildDelete guild became unavailable.
EventGuildEmojisUpdate guild emojis were updated.
EventGuildIntegrationsUpdate guild integration was updated.
EventGuildMemberAdd new user joined a guild.
EventGuildMemberRemove user was removed from a guild.
EventGuildMembersChunk response to Request Guild Members.
EventGuildMemberUpdate guild member was updated.
EventGuildRoleCreate guild role was created.
EventGuildRoleDelete guild role was deleted.
EventGuildRoleUpdate guild role was updated.
EventGuildUpdate guild was updated.
EventHello defines the heartbeat interval.
EventIntegrationCreate guild integration was created.
EventIntegrationDelete guild integration was deleted.
EventIntegrationUpdate guild integration was updated.
EventInteractionCreate user used an interaction.
EventInvalidSession failure response to Identify or Resume or invalid active session.
EventInviteCreate invite to a channel was created.
EventInviteDelete invite to a channel was deleted.
EventMessageCreate message was created.
EventMessageDelete message was deleted.
EventMessageDeleteBulk multiple messages were deleted at once.
EventMessageReactionAdd user reacted to a message.
EventMessageReactionRemove user removed a reaction from a message.
EventMessageReactionRemoveAll all reactions were explicitly removed from a message.
EventMessageReactionRemoveEmoji all reactions for a given emoji were explicitly removed from a message.
EventMessageUpdate message was edited.
EventPresenceUpdate user was updated.
EventReady contains the initial state information.
EventReconnect server is going away.
EventResumed response to Resume.
EventStageInstanceCreate stage instance was created.
EventStageInstanceDelete stage instance was deleted or closed.
EventStageInstanceUpdate stage instance was updated.
EventThreadCreate thread created.
EventThreadDelete thread was deleted.
EventThreadListSync sent when gaining access to a channel.
EventThreadMembersUpdate some user(s) were added to or removed from a thread.
EventThreadMemberUpdate thread member for the current user was updated.
EventThreadUpdate thread was updated.
EventTypingStart user started typing in a channel.
EventUserUpdate properties about the user changed.
EventVoiceServerUpdate guild's voice server was updated.
EventVoiceStateUpdate someone joined.
EventWebhooksUpdate guild channel webhook was created.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Direct Messages.
No description provided by the author
Direct Message Reactions.
No description provided by the author
No description provided by the author
No description provided by the author
Direct Message Typing.
No description provided by the author
Guild Bans.
No description provided by the author
Guild.
No description provided by the author
Guild Emojis.
Guild Integrations.
Guild Members.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Guild Invites.
No description provided by the author
No description provided by the author
Guild Messages.
No description provided by the author
No description provided by the author
Guild Message Reactions.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Guild Presences.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Guild Message Typing.
Guild Voice States.
Guild Webhooks.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ClientStatus Active sessions are indicated with an "online", "idle", or "dnd" string per platform.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
EventHandler is a function that takes a single interface{} argument which is an Event Data type as listed in events.go and documented in https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events this is the expected argument for all event handlers, and is intentionally left as an interface{} type, instead of multiple handlers with concrete types.
No description provided by the author
No description provided by the author