slack

package
v0.0.0-...-9a39f02 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2018 License: ISC Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(token, room, name string) gobot.Bot

Types

type Bot

type Bot struct {
	Opt Options
	// contains filtered or unexported fields
}

func (*Bot) Client

func (b *Bot) Client() *slack.RTM

func (*Bot) Connect

func (b *Bot) Connect() error

func (*Bot) FullName

func (b *Bot) FullName() string

func (*Bot) Listen

func (b *Bot) Listen() chan gobot.Message

func (*Bot) Log

func (b *Bot) Log(msg string)

func (*Bot) Name

func (b *Bot) Name() string

func (*Bot) Reply

func (b *Bot) Reply(orig gobot.Message, msg string)

func (*Bot) Send

func (b *Bot) Send(msg string)

func (*Bot) SetLogger

func (b *Bot) SetLogger(logger *log.Logger)

type Message

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

func (Message) Body

func (m Message) Body() string

func (Message) EffectiveMessage

func (m Message) EffectiveMessage() *slack.MessageEvent

func (Message) From

func (m Message) From() string

func (Message) Room

func (m Message) Room() string

type Options

type Options struct {
	Token    string
	Room     string
	Name     string
	Protocol string
	Debug    bool
}

Jump to

Keyboard shortcuts

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