Version: v0.0.0-...-ec4bb3c Latest Latest

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

Go to latest
Published: Oct 17, 2020 License: MIT Imports: 0 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Chat

type Chat struct {
	ID          int64  `json:"id"`
	ChatType    string `json:"type"`
	Title       string `json:"title"`
	Username    string `json:"username"`
	FirstName   string `json:"first_name"`
	LastName    string `json:"last_name"`
	Description string `json:"description"`
	InviteLink  string `json:"invite_link"`

Chat is used receive updates from webhook

type IncomingMessage

type IncomingMessage struct {
	UpdatedID int     `json:"id"`
	Message   Message `json:"message"`

WebhookUpdate receives updates from telegram

type Message

type Message struct {
	MessageID int64  `json:"message_id"`
	Date      int    `json:"date"`
	Chat      Chat   `json:"chat"`
	Text      string `json:"text"`

Message is used to receive updates from webhook

type Response

type Response struct {
	Ok     bool `json:"ok"`
	Result User `json:"result"`

GetMeResponse is used to check the bot status

type SendMessage

type SendMessage struct {
	ChatID             int64  `json:"chat_id"`
	Text               string `json:"text"`
	InReplyToMessageID int64  `json:"reply_to_message_id"` // optional

SendMessage is used to send message to user

type User

type User struct {
	ID           int64  `json:"id"`
	FirstName    string `json:"first_name"`
	LastName     string `json:"last_name"`     // optional
	UserName     string `json:"username"`      // optional
	LanguageCode string `json:"language_code"` // optional
	IsBot        bool   `json:"is_bot"`        // optional

User is used to receive updates from webhook

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL