Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel - A text channel inside a server.
type Client ¶
type Client interface { // Guilds - Returns the guilds or servers the discord user or bot // is added to. Guilds() ([]Guild, error) // Channels - Returns the channels inside a a particular // guild or server this user or bot is added to. Channels(guildID string) ([]Channel, error) // Messages - Returns the last "count" of messages for this // channel. Messages(channelID string, count int) ([]Message, error) // SendMessage - To send a message to a channel. SendMessage(channelID string, message string) error }
Client - Custom wrapper to interact with discord API.
func NewClient ¶
func NewClient(config ClientConfig) (Client, error)
NewClient - Gets a new Discord client.
type ClientConfig ¶
type ClientConfig interface { // Token - Used to authenticate. Token() string // IsBot - Used to identify if token belongs to bot. IsBot() bool }
ClientConfig - To configure discord client.
func NewConfig ¶
func NewConfig() (ClientConfig, error)
NewConfig - Provides a new config from environment variables for discord client.
Click to show internal directories.
Click to hide internal directories.