Categorygithub.com/landonr/discordgo
modulepackage
0.6.0
Repository: https://github.com/landonr/discordgo.git
Documentation: pkg.go.dev

# README

DiscordGo provides low level bindings for Discord in the Go Programming Language (Golang).

  • See dgVoice for experimental voice support.

Join #go_discordgo Discord API channel on Discord for support.

GoDoc Go Walker Go report Build Status


Usage Examples

See the example sub-folder for examples. Each example accepts a username and password as a CLI argument when run.

Documentation

NOTICE : This library and the Discord API are unfinished. Because of that there may be major changes to library functions, constants, and structures.

  • GoDoc
  • Go Walker
  • Hand crafted documentation coming eventually.

What Works

Current package provides a low level direct mapping to the majority of Discord REST and Websock API.

  • Login/Logout
  • Open/Close Websocket and listen for events.
  • Accept/Create/Delete Invites
  • Get User details (Name, ID, Settings, etc)
  • List/Create User Channels (Private Message Channels)
  • List/Create Guilds
  • List/Create Guild Channels
  • List Guild Members
  • Receive/Send Messages to Channels

What's Unfinished

  • Make changes as needed to pass GoLint, GoVet, GoCyclo, etc. (goreportcard.com)
  • Editing User Profile settings
  • Permissions related functions.
  • Functions for Maintenance Status
  • Finish Voice support.
  • Add a higher level interface with user friendly helper functions.

Other Discord APIs

Go: gdraynz/go-discord, Xackery/discord, Nerketur/discordapi

.NET: RogueException/Discord.Net, Luigifan/DiscordSharp

Java: nerd/Discord4J

Node.js: izy521/discord.io, hydrabolt/discord.js, qeled/discordie,

PHP: Cleanse/discord-hypertext, teamreflex/DiscordPHP

Python: Rapptz/discord.py

Ruby: meew0/discordrb

Scala: eaceaser/discord-akka

Rust: SpaceManiac/discord-rs

# Packages

No description provided by the author

# Functions

type Config struct { Debug bool } */ // possible future main struct for discord connection type Discord struct { Debug bool // Set to true to enable debug logging Token string // authentication token User User // authenticated user info Guilds []Guild // Cached Guild info Channels []Channel // Cached Channel info API api // all api endpoint functions DataWS dataWS // data websocket connection VoiceWS voiceWS // voice websocket/udp connections VoiceUDP voiceUDP } type api struct { Session } type dataWS struct { } type voiceWS struct { } type voiceUDP struct { } */ NOTICE: This function should be considered unstable because I am still exploring the best way to implement my goals here.

# Constants

DiscordGo Version, follows Symantic Versioning.

# Variables

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
TODO consider removing.
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

# Structs

An Attachment stores data for message attachments.
A Channel holds all data related to an individual Discord channel.
An Embed stores data for message embeds.
An Event provides a basic initial struct for all websocket event.
A Guild holds all data related to a specific Discord Guild.
A GuildIntegrationsUpdate stores data for the guild integrations update websocket event.
A GuildRole stores data for guild role websocket events.
A GuildRoleDelete stores data for the guild role delete websocket event.
A ICEServer stores data for a specific voice ICE server.
A Invite stores all data related to a specific Discord Guild or Channel invite.
A Member stores user information for Guild members.
A Message stores all data related to a specific Discord message.
A MessageAck stores data for the message ack websocket event.
A MessageDelete stores data for the message delete websocket event.
A PermissionOverwrite holds permission overwrite data for a Channel.
A Presence stores the online, offline, or idle and game status of Guild members.
A PresenceUpdate stores data for the pressence update websocket event.
A PrivateChannel stores all data for a specific user private channel.
A ReadState stores data on the read state of channels.
A Ready stores all data for the websocket READY event.
A Role stores information about Discord guild member roles.
A Session represents a connection to the Discord REST API.
A Settings stores data for a specific users Discord client settings.
A TypingStart stores data for the typing start websocket event.
A User stores all data for an individual Discord user.
A VEvent is the initial structure for voice websocket events.
A VoiceICE stores data for voice ICE servers.
A VoiceOP2 stores the data for voice operation 2 websocket events which is sort of like the voice READY packet.
A VoiceRegion stores data for a specific voice region server.
A VoiceServerUpdate stores the data received during the Voice Server Update data websocket event.
A VoiceState stores the voice states of Guilds.