Documentation ¶
Index ¶
- type Message
- type Telegram
- func (h *Telegram) HandleChannelEvent(event interface{}, controller *chik.Controller) error
- func (h *Telegram) HandleMessage(message *chik.Message, controller *chik.Controller) error
- func (h *Telegram) HandleTimerEvent(tick time.Time, controller *chik.Controller) error
- func (h *Telegram) Setup(controller *chik.Controller) (chik.Interrupts, error)
- func (h *Telegram) String() string
- func (h *Telegram) Teardown()
- func (h *Telegram) Topics() []types.CommandType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
Message string `json:"message"`
}
Message is the message the bot can send it needs to be of type: TelegramNotificationCommandType
type Telegram ¶
type Telegram struct { chik.BaseHandler Token string `json:"token" mapstructure:"token"` AllowedUsers []string `json:"allowed_users" mapstructure:"allowed_users"` AppliancesByName map[string]string `json:"appliances_by_name" mapstructure:"appliances_by_name"` SetStrings []string `json:"set_strings" mapstructure:"set_strings"` ResetStrings []string `json:"reset_strings" mapstructure:"reset_strings"` SetDoneMessage string `json:"set_done_message" mapstructure:"set_done_message"` ReseDonetMessage string `json:"reset_done_message" mapstructure:"reset_done_message"` // contains filtered or unexported fields }
Telegram handler
func New ¶
func New() *Telegram
New creates a telegram handler. useful for sending notifications about events
func (*Telegram) HandleChannelEvent ¶ added in v1.6.0
func (h *Telegram) HandleChannelEvent(event interface{}, controller *chik.Controller) error
func (*Telegram) HandleMessage ¶
func (*Telegram) HandleTimerEvent ¶ added in v1.6.0
func (*Telegram) Setup ¶ added in v1.6.0
func (h *Telegram) Setup(controller *chik.Controller) (chik.Interrupts, error)
func (*Telegram) Topics ¶
func (h *Telegram) Topics() []types.CommandType
Click to show internal directories.
Click to hide internal directories.