modulepackage
0.0.0-20211022135651-c2e811693422
Repository: https://github.com/bots-house/go-tg.git
Documentation: pkg.go.dev
# README
go-tg
Packages for accessing Telegram Bot API and create stateful bots
# Packages
No description provided by the author
# Functions
NewClient creates new Telegram Bot API client with provided token.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewInputFile creates the InputFile from provided name and body reader.
NewInputFileBytes creates input file from provided name.
NewInputFileLocal creates the InputFile from provided local file.
NewInputFileLocalBuffer creates the InputFile from provided local file path.
No description provided by the author
No description provided by the author
NewRequest creates request with provided method.
Polling updates.
WithDoer sets client http doer.
# Constants
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
# Structs
Animation object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
No description provided by the author
No description provided by the author
Audio object represents an audio file to be treated as music by the Telegram clients.
No description provided by the author
BotCommand represents a bot command.
Optional.
CallbackQuery This object represents an incoming callback query from a callback button in an inline keyboard.
Chat object represents a chat.
No description provided by the author
ChatPermissions describes actions that a non-administrator user is allowed to take in a chat.
ChatPhoto object represents a chat photo.
Client it's Telegram Bot API client.
Contact object represents a phone contact.
Dice object represents a dice with a random value from 1 to 6 for currently supported base emoji.
Document object represents a general file (as opposed to photos, voice messages and audio files).
No description provided by the author
Error represents Telegram Bot API.
No description provided by the author
No description provided by the author
Game object represents a game.
No description provided by the author
InlineKeyboardButton object represents one button of an inline keyboard.
InlineKeyboardMarkup object represents an inline keyboard that appears right next to the message it belongs to.
InputFile represents the file that should be uploaded to the telegram.
InputMediaAnimation an animation to be sent.
InputMediaAudio an audio to be sent.
InputMediaDocument a document to be sent.
InputMediaPhoto a photo to be sent.
InputMediaVideo a video to be sent.
KeyboardButton object represents one button of the reply keyboard.
KeyboardButtonPollType object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
Location object represents a point on the map.
No description provided by the author
LoginURL object represents a parameter of the inline keyboard button used to automatically authorize a user.
MaskPosition object describes the position on faces where a mask should be placed by default.
No description provided by the author
Message object represents a message.
MessageEntity object represents one special entity in a text message.
No description provided by the author
PhotoSize object represents one size of a photo or a file / sticker thumbnail.
Poll object contains information about a poll.
PollAnswer object represents an answer of a user in a non-anonymous poll.
Poller listen to updates using long polling.
No description provided by the author
PollOption object contains information about one answer option in a poll.
ReplyKeyboardMarkup object represents a custom keyboard with reply options.
ReplyKeyboardRemove Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard.
Request represents RPC request to Telegram Bot API.
Response represents Telegram Bot API response.
ResponseParameters contains information about why a request was unsuccessful.
No description provided by the author
Sticker object represents a sticker.
TextOpts contains optional parameters for SendText method.
Update represents an incoming update.
User represents Telegram user.
UserBot represents Telegram bot user info.
No description provided by the author
Venue object represents a venue.
Video object represents a video file.
VideNote object represents a video message (available in Telegram apps as of v.4.0).
No description provided by the author
Voice object represents a voice note.
Contains information about the current status of a webhook.
# Interfaces
Doer define interface for mock client calls.
Handler responds to Telegram Bot API update.
No description provided by the author
No description provided by the author
Peer define generic interface for Telegram chat ID.
No description provided by the author
# Type aliases
CallbackQueryID unique ID.
ChatID represents ID of Telegram chat.
ClientOption define type for customize client.
Duration.
No description provided by the author
FileID it's ID of uploaded file.
The HandlerFunc type is an adapter to allow the use of ordinary functions as bot handlers.
No description provided by the author
No description provided by the author
MessageID unique message identifier inside this chat.
No description provided by the author
PollID it's unique poll identifier.
UnixTime represents Unix timestamp.
UpdateID the update‘s unique identifier.
UserID it's unique user ID in Telegram.
Username it's Telegram username.