Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatBotRunner ¶
type ChatBotRunner interface { Run() FeedBroadcast(messageChannel <-chan ChatMessage) }
type ChatMessage ¶
type TelegramRunner ¶
type TelegramRunner struct {
// contains filtered or unexported fields
}
func NewTelegram ¶
func NewTelegram(token string, cfg config.Config, provider TelegramProvider) (*TelegramRunner, error)
NewTelegram creates a new telegram bot runner. This function uses the `chat_db` environment variable for storing the chats.
func (*TelegramRunner) FeedBroadcast ¶
func (t *TelegramRunner) FeedBroadcast(messageChannel <-chan ChatMessage) error
FeedBroadcast the messages that are passed to each one of the chats.
func (*TelegramRunner) ForEachChat ¶
func (t *TelegramRunner) ForEachChat(callback func(chat interface{}))
ForEachChat goes over all the persisted chats and invokes the callback on them.
func (*TelegramRunner) Run ¶
func (t *TelegramRunner) Run() error
Run the bot, listening for updates from users
Click to show internal directories.
Click to hide internal directories.