Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller handles incoming Telegram updates and orchestrates responses.
func NewController ¶
func NewController(b *telebot.Bot) *Controller
NewController creates a new Controller instance. NewController creates a new instance of the Controller. It initializes the URL parsing regex.
func (*Controller) OnStart ¶
func (*Controller) OnStart(c telebot.Context) error
OnStart is the entry point for the incoming update OnStart handles the /start command, sending a welcome message in private chats.
func (*Controller) OnText ¶
func (x *Controller) OnText(c telebot.Context) error
OnText handles incoming text messages. It extracts URLs from the message text and processes them. If no links are found, it sends an error message in private chats.
Click to show internal directories.
Click to hide internal directories.