discord

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2018 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discord

type Discord struct {
	// contains filtered or unexported fields
}

Discord provides io access to the Discord network.

func New

func New(cfg *transport.Config) (*Discord, error)

New returns a new instance of Discord.

func (*Discord) Channels

func (d *Discord) Channels() ([]*transport.Channel, error)

Channels lists all the channels we have access to.

func (*Discord) GetConversation added in v0.0.2

func (d *Discord) GetConversation(userID string) (string, error)

GetConversation gets a private conversation for the given user ID.

func (*Discord) GetUser

func (d *Discord) GetUser(user string) (*transport.User, error)

GetUser returns the full user data for the provided name or ID.

func (*Discord) GetUsers added in v0.0.2

func (d *Discord) GetUsers() ([]*transport.User, error)

GetUsers returns a list of all known users.

func (*Discord) SendEvent

func (d *Discord) SendEvent(ev *transport.Event) error

SendEvent sends a new event to Slack.

func (*Discord) SendMessage

func (d *Discord) SendMessage(dest, msg string) error

SendMessage sends a message over the discord network.

func (*Discord) TunnelEvents

func (d *Discord) TunnelEvents(ctx context.Context, evCh chan *transport.Event, errCh chan error)

TunnelEvents translates discord events to transport.Events tunneling them into evCh. The session is terminated when ctx.Done returns.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL