package
0.0.0-20200526111342-3af5e6782ac8
Repository: https://github.com/jexia/discord-bot.git
Documentation: pkg.go.dev
# Functions
StartBot gets the environment variables needed for the Discord gateway, creates the new session type and starts the initial websocket connection to Discord's gateway.
StartSubscriber subscribes to the discord message_create event on the queue and waits for a response, also subscribes to the internal send_response event which then sends the payload to Discord's API.
# Structs
APIEmbedPayload is a payload for sending an embed based message over Discord's API.
APIPayload is a payload for sending a text based message over Discord's API.
Heartbeat is the type used to send a heartbeat back over the Discord websocket.
Message is Discord's message structure.
Payload is a simple structure used to receive and send events over the websocket.
Session is the type which holds Discord's current session.
# Type aliases
Timestamp stores a timestamp, as sent by the Discord API.