Documentation ¶
Index ¶
- Constants
- type Bot
- func (b *Bot) ChangeSource(ctx context.Context, userID int, newSource models.Source) (string, interface{}, error)
- func (b *Bot) GetUpdatesChan() (tgbotapi.UpdatesChannel, error)
- func (b *Bot) MessageHandler(ctx context.Context, update tgbotapi.Update) (tgbotapi.Message, error)
- func (b *Bot) RandomPost(ctx context.Context, userID int) (string, error)
- func (b *Bot) TopPosts(ctx context.Context, userID int) (string, error)
- type DefaultHTTPClient
- type HTTPClient
- type Options
- type Storage
Constants ¶
View Source
const (
MessageHelp = `` /* 340-byte string literal not displayed */
)
View Source
const MessageTopSlate = `` /* 1223-byte string literal not displayed */
As https://slatestarcodex.com top posts won't change anymore it's much more effecient to return hardcoded list.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) ChangeSource ¶
func (*Bot) GetUpdatesChan ¶
func (b *Bot) GetUpdatesChan() (tgbotapi.UpdatesChannel, error)
func (*Bot) MessageHandler ¶
type DefaultHTTPClient ¶
func NewHTTPClient ¶
func NewHTTPClient() *DefaultHTTPClient
type HTTPClient ¶
Click to show internal directories.
Click to hide internal directories.