v1.0.0 beta 15

This commit is contained in:
2026-03-12 17:45:53 +03:00
parent 3b6bb82e04
commit d6e2daec04
28 changed files with 1224 additions and 126 deletions

View File

@@ -1,14 +1,21 @@
package tgapi
// MaskPositionPoint represents the part of the face where a mask should be placed.
type MaskPositionPoint string
const (
// MaskPositionForehead places the mask on the forehead.
MaskPositionForehead MaskPositionPoint = "forehead"
MaskPositionEyes MaskPositionPoint = "eyes"
MaskPositionMouth MaskPositionPoint = "mouth"
MaskPositionChin MaskPositionPoint = "chin"
// MaskPositionEyes places the mask on the eyes.
MaskPositionEyes MaskPositionPoint = "eyes"
// MaskPositionMouth places the mask on the mouth.
MaskPositionMouth MaskPositionPoint = "mouth"
// MaskPositionChin places the mask on the chin.
MaskPositionChin MaskPositionPoint = "chin"
)
// MaskPosition describes the position on faces where a mask should be placed by default.
// See https://core.telegram.org/bots/api#maskposition
type MaskPosition struct {
Point MaskPositionPoint `json:"point"`
XShift float32 `json:"x_shift"`
@@ -16,14 +23,20 @@ type MaskPosition struct {
Scale float32 `json:"scale"`
}
// StickerType represents the type of a sticker.
type StickerType string
const (
StickerTypeRegular StickerType = "regular"
StickerTypeMask StickerType = "mask"
// StickerTypeRegular is a regular sticker.
StickerTypeRegular StickerType = "regular"
// StickerTypeMask is a mask sticker that can be placed on faces.
StickerTypeMask StickerType = "mask"
// StickerTypeCustomEmoji is a custom emoji sticker.
StickerTypeCustomEmoji StickerType = "custom_emoji"
)
// Sticker represents a sticker.
// See https://core.telegram.org/bots/api#sticker
type Sticker struct {
FileId string `json:"file_id"`
FileUniqueId string `json:"file_unique_id"`
@@ -41,6 +54,9 @@ type Sticker struct {
NeedRepainting *bool `json:"need_repainting,omitempty"`
FileSize *int `json:"file_size,omitempty"`
}
// StickerSet represents a sticker set.
// See https://core.telegram.org/bots/api#stickerset
type StickerSet struct {
Name string `json:"name"`
Title string `json:"title"`
@@ -48,14 +64,21 @@ type StickerSet struct {
Stickers []Sticker `json:"stickers"`
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
}
// InputStickerFormat represents the format of an input sticker.
type InputStickerFormat string
const (
InputStickerFormatStatic InputStickerFormat = "static"
// InputStickerFormatStatic is a static sticker (WEBP).
InputStickerFormatStatic InputStickerFormat = "static"
// InputStickerFormatAnimated is an animated sticker (TGS).
InputStickerFormatAnimated InputStickerFormat = "animated"
InputStickerFormatVideo InputStickerFormat = "video"
// InputStickerFormatVideo is a video sticker (WEBM).
InputStickerFormatVideo InputStickerFormat = "video"
)
// InputSticker describes a sticker to be added to a sticker set.
// See https://core.telegram.org/bots/api#inputsticker
type InputSticker struct {
Sticker string `json:"sticker"`
Format InputStickerFormat `json:"format"`