Versions in this module Expand all Collapse all v0 v0.2.0 Feb 17, 2020 Changes in this version + const MsgBroadcastFinished + const MsgBroadcastStarted + type Anecdote struct + func NewAnecdote(client HTTPClient) *Anecdote + func (a Anecdote) Help() string + func (a Anecdote) OnMessage(msg Message) (response Response) + func (a Anecdote) ReactOn() []string + type BroadcastParams struct + Client http.Client + DelayToOff time.Duration + PingInterval time.Duration + URL string + type BroadcastStatus struct + func NewBroadcastStatus(ctx context.Context, params BroadcastParams) *BroadcastStatus + func (b *BroadcastStatus) Help() string + func (b *BroadcastStatus) OnMessage(_ Message) (response Response) + func (b *BroadcastStatus) ReactOn() []string + type Duck struct + func NewDuck(key string, client HTTPClient) *Duck + func (d *Duck) Help() string + func (d *Duck) OnMessage(msg Message) (response Response) + func (d *Duck) ReactOn() []string + type Entity struct + Length int + Offset int + Type string + URL string + User *User + type Excerpt struct + func NewExcerpt(api string, token string) *Excerpt + func (e *Excerpt) Help() string + func (e *Excerpt) OnMessage(msg Message) (response Response) + func (e *Excerpt) ReactOn() []string + type HTTPClient interface + Do func(req *http.Request) (*http.Response, error) + type Image struct + Caption string + Entities *[]Entity + FileID string + Height int + Width int + type Interface interface + Help func() string + OnMessage func(msg Message) (response Response) + ReactOn func() []string + type Message struct + Entities *[]Entity + From User + HTML string + ID int + Image *Image + Sent time.Time + Text string + type MockHTTPClient struct + func (_m *MockHTTPClient) Do(req *http.Request) (*http.Response, error) + type MockInterface struct + func (_m *MockInterface) Help() string + func (_m *MockInterface) OnMessage(msg Message) Response + func (_m *MockInterface) ReactOn() []string + type MockSuperUser struct + func (_m *MockSuperUser) IsSuper(userName string) bool + type MultiBot []Interface + func (b MultiBot) Help() string + func (b MultiBot) OnMessage(msg Message) (response Response) + func (b MultiBot) ReactOn() (res []string) + type News struct + func NewNews(client HTTPClient, api string, max int) *News + func (n News) Help() string + func (n News) OnMessage(msg Message) (response Response) + func (n News) ReactOn() []string + type Podcasts struct + func NewPodcasts(client HTTPClient, api string, maxResults int) *Podcasts + func (p *Podcasts) Help() string + func (p *Podcasts) OnMessage(msg Message) (response Response) + func (p *Podcasts) ReactOn() []string + type PrepPost struct + func NewPrepPost(client HTTPClient, api string, d time.Duration) *PrepPost + func (p *PrepPost) Help() string + func (p *PrepPost) OnMessage(Message) (response Response) + func (p *PrepPost) ReactOn() []string + type Response struct + BanInterval time.Duration + Pin bool + Preview bool + Send bool + Text string + Unpin bool + type StackOverflow struct + func NewStackOverflow() *StackOverflow + func (s StackOverflow) Help() string + func (s StackOverflow) OnMessage(msg Message) (response Response) + func (s StackOverflow) ReactOn() []string + type SuperUser interface + IsSuper func(userName string) bool + type Sys struct + func NewSys(dataLocation string) (*Sys, error) + func (p Sys) Help() (line string) + func (p Sys) OnMessage(msg Message) (response Response) + func (p Sys) ReactOn() []string + type User struct + DisplayName string + ID int + Username string + type WTF struct + func NewWTF(minDuration, maxDuration time.Duration, luckFactor float64) *WTF + func (w WTF) Help() string + func (w WTF) OnMessage(msg Message) (response Response) + func (w WTF) ReactOn() []string