telegram

package
v0.0.0-...-a82784a Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFileId

func DownloadFileId(cfg *config.Config, id, filename string) error
func GetLink(cfg *config.Config, id string) (string, error)

Types

type ReplyMarkup

type ReplyMarkup struct {
	InlineKeyboard string `json:"inline_keyboard"`
}

type URLButton

type URLButton struct {
	URL  string `json:"url"`
	Text string `json:"text"`
}

type WebhookResponse

type WebhookResponse struct {
	Method string `json:"method,omitempty"`
	ChatID string `json:"chat_id"`

	Animation *string `json:"animation,omitempty"`
	Photo     *string `json:"photo,omitempty"`
	Video     *string `json:"video,omitempty"`
	Caption   *string `json:"caption,omitempty"`

	// Location
	Latitude  *float64 `json:"latitude,omitempty"`
	Longitude *float64 `json:"longitude,omitempty"`

	// Text
	Text      *string `json:"text,omitempty"`
	ParseMode string  `json:"parse_mode,omitempty"`

	// Keyboard
	ReplyMarkup *string `json:"reply_markup,omitempty"`
	// contains filtered or unexported fields
}

func (*WebhookResponse) Empty

func (w *WebhookResponse) Empty() *WebhookResponse

func (*WebhookResponse) Marshal

func (w *WebhookResponse) Marshal() ([]byte, error)

func (*WebhookResponse) SendAnimation

func (w *WebhookResponse) SendAnimation(id string) *WebhookResponse

func (*WebhookResponse) SendDice

func (w *WebhookResponse) SendDice() *WebhookResponse

func (*WebhookResponse) SendLocation

func (w *WebhookResponse) SendLocation() *WebhookResponse

func (*WebhookResponse) SendMessage

func (w *WebhookResponse) SendMessage() *WebhookResponse

func (*WebhookResponse) SendPhoto

func (w *WebhookResponse) SendPhoto(id string) *WebhookResponse

func (*WebhookResponse) SendVideo

func (w *WebhookResponse) SendVideo(id string) *WebhookResponse

func (*WebhookResponse) SetChatID

func (w *WebhookResponse) SetChatID(chatID string) *WebhookResponse

func (*WebhookResponse) SetKeyboard

func (w *WebhookResponse) SetKeyboard(kb string) *WebhookResponse

func (*WebhookResponse) SetKeyboardInterface

func (w *WebhookResponse) SetKeyboardInterface(kb interface{}) (*WebhookResponse, error)
func (w *WebhookResponse) SetLinks(data []URLButton) *WebhookResponse

func (*WebhookResponse) SetLocation

func (w *WebhookResponse) SetLocation(lat, lon float64) *WebhookResponse

func (*WebhookResponse) SetText

func (w *WebhookResponse) SetText(text string) *WebhookResponse

func (*WebhookResponse) UseMarkdown

func (w *WebhookResponse) UseMarkdown() *WebhookResponse

Jump to

Keyboard shortcuts

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