Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Automation ¶
type Automation struct { *messages.Monitoring Username string InputPeer tg.InputPeerClass // contains filtered or unexported fields }
func NewAutomation ¶
func NewAutomation(ctx context.Context, client *telegram.Client, dispatcher tg.UpdateDispatcher, username string, strip bool) (*Automation, error)
NewAutomation creates a new `Automation` object. It requires an username, since all (official) Telegram Bot have an username.
func (*Automation) ReplyToMessage ¶
func (a *Automation) ReplyToMessage(msgID int, text string) error
func (*Automation) SendCallbackData ¶
func (a *Automation) SendCallbackData(msgID int, callbackData string) (*tg.MessagesBotCallbackAnswer, error)
func (*Automation) SendStartMessageWithParams ¶
func (a *Automation) SendStartMessageWithParams(params string) error
SendStartMessageWithParams will start a chat with a bot with the appropriate parameters. For instance, if you receive the link https://t.me/randombot?start=hello, the "hello" parameter will be sent as well.
func (*Automation) SendTextMessage ¶
func (a *Automation) SendTextMessage(text string) error
Click to show internal directories.
Click to hide internal directories.