handler

package
v0.0.0-...-3a05e6f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexHandler

func IndexHandler(w http.ResponseWriter, r *http.Request)

IndexHandler handles incoming HTTP requests and sets up a webhook for a Telegram bot. It takes an HTTP response writer (w) and a request (r), and ensures that the bot's webhook is properly configured. If any errors occur during the process, they are logged. After the webhook is set up successfully, it writes an "Index OK" message to the response writer (w).

func WebhookHandler

func WebhookHandler(w http.ResponseWriter, r *http.Request)

WebhookHandler handles incoming HTTP requests for a Telegram bot's webhook. It processes updates, handles commands, and takes appropriate actions based on the received messages. If any errors occur during the process, they are logged. After processing the request, it writes a "Webhook OK" message to the response writer (w).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL