some cleanup

This commit is contained in:
2026-02-12 13:50:02 +03:00
parent 12883f428e
commit 4129b8e688
16 changed files with 334 additions and 428 deletions

View File

@@ -14,7 +14,7 @@ type SendStickerP struct {
MessageEffectID string `json:"message_effect_id,omitempty"`
}
func (api *Api) SendSticker(params SendStickerP) (Message, error) {
func (api *API) SendSticker(params SendStickerP) (Message, error) {
req := NewRequest[Message]("sendSticker", params)
return req.Do(api)
}
@@ -23,7 +23,7 @@ type GetStickerSetP struct {
Name string `json:"name"`
}
func (api *Api) GetStickerSet(params GetStickerSetP) (StickerSet, error) {
func (api *API) GetStickerSet(params GetStickerSetP) (StickerSet, error) {
req := NewRequest[StickerSet]("getStickerSet", params)
return req.Do(api)
}
@@ -32,7 +32,7 @@ type GetCustomEmojiStickersP struct {
CustomEmojiIDs []string `json:"custom_emoji_ids"`
}
func (api *Api) GetCustomEmojiStickers(params GetCustomEmojiStickersP) ([]Sticker, error) {
func (api *API) GetCustomEmojiStickers(params GetCustomEmojiStickersP) ([]Sticker, error) {
req := NewRequest[[]Sticker]("getCustomEmojiStickers", params)
return req.Do(api)
}
@@ -47,7 +47,7 @@ type CreateNewStickerSetP struct {
NeedsRepainting bool `json:"needs_repainting,omitempty"`
}
func (api *Api) CreateNewStickerSet(params CreateNewStickerSetP) (bool, error) {
func (api *API) CreateNewStickerSet(params CreateNewStickerSetP) (bool, error) {
req := NewRequest[bool]("createNewStickerSet", params)
return req.Do(api)
}
@@ -58,7 +58,7 @@ type AddStickerToSetP struct {
Sticker InputSticker `json:"sticker"`
}
func (api *Api) AddStickerToSet(params AddStickerToSetP) (bool, error) {
func (api *API) AddStickerToSet(params AddStickerToSetP) (bool, error) {
req := NewRequest[bool]("addStickerToSet", params)
return req.Do(api)
}
@@ -68,7 +68,7 @@ type SetStickerPositionInSetP struct {
Position int `json:"position"`
}
func (api *Api) SetStickerPosition(params SetStickerPositionInSetP) (bool, error) {
func (api *API) SetStickerPosition(params SetStickerPositionInSetP) (bool, error) {
req := NewRequest[bool]("setStickerPosition", params)
return req.Do(api)
}
@@ -77,7 +77,7 @@ type DeleteStickerFromSetP struct {
Sticker string `json:"sticker"`
}
func (api *Api) DeleteStickerFromSet(params DeleteStickerFromSetP) (bool, error) {
func (api *API) DeleteStickerFromSet(params DeleteStickerFromSetP) (bool, error) {
req := NewRequest[bool]("deleteStickerFromSet", params)
return req.Do(api)
}
@@ -89,7 +89,7 @@ type ReplaceStickerInSetP struct {
Sticker InputSticker `json:"sticker"`
}
func (api *Api) ReplaceStickerInSet(params ReplaceStickerInSetP) (bool, error) {
func (api *API) ReplaceStickerInSet(params ReplaceStickerInSetP) (bool, error) {
req := NewRequest[bool]("replaceStickerInSet", params)
return req.Do(api)
}
@@ -99,7 +99,7 @@ type SetStickerEmojiListP struct {
EmojiList []string `json:"emoji_list"`
}
func (api *Api) SetStickerEmojiList(params SetStickerEmojiListP) (bool, error) {
func (api *API) SetStickerEmojiList(params SetStickerEmojiListP) (bool, error) {
req := NewRequest[bool]("setStickerEmojiList", params)
return req.Do(api)
}
@@ -109,7 +109,7 @@ type SetStickerKeywordsP struct {
Keywords []string `json:"keywords"`
}
func (api *Api) SetStickerKeywords(params SetStickerKeywordsP) (bool, error) {
func (api *API) SetStickerKeywords(params SetStickerKeywordsP) (bool, error) {
req := NewRequest[bool]("setStickerKeywords", params)
return req.Do(api)
}
@@ -119,7 +119,7 @@ type SetStickerMaskPositionP struct {
MaskPosition *MaskPosition `json:"mask_position,omitempty"`
}
func (api *Api) SetStickerMaskPosition(params SetStickerMaskPositionP) (bool, error) {
func (api *API) SetStickerMaskPosition(params SetStickerMaskPositionP) (bool, error) {
req := NewRequest[bool]("setStickerMaskPosition", params)
return req.Do(api)
}
@@ -129,7 +129,7 @@ type SetStickerSetTitleP struct {
Title string `json:"title"`
}
func (api *Api) SetStickerSetTitle(params SetStickerSetTitleP) (bool, error) {
func (api *API) SetStickerSetTitle(params SetStickerSetTitleP) (bool, error) {
req := NewRequest[bool]("setStickerSetTitle", params)
return req.Do(api)
}
@@ -141,7 +141,7 @@ type SetStickerSetThumbnailP struct {
Format InputStickerFormat `json:"format"`
}
func (api *Api) SetStickerSetThumbnail(params SetStickerSetThumbnailP) (bool, error) {
func (api *API) SetStickerSetThumbnail(params SetStickerSetThumbnailP) (bool, error) {
req := NewRequest[bool]("setStickerSetThumbnail", params)
return req.Do(api)
}
@@ -151,7 +151,7 @@ type SetCustomEmojiStickerSetThumbnailP struct {
CustomEmojiID string `json:"custom_emoji_id,omitempty"`
}
func (api *Api) SetCustomEmojiStickerSetThumbnail(params SetStickerSetThumbnailP) (bool, error) {
func (api *API) SetCustomEmojiStickerSetThumbnail(params SetStickerSetThumbnailP) (bool, error) {
req := NewRequest[bool]("setCustomEmojiStickerSetThumbnail", params)
return req.Do(api)
}
@@ -160,7 +160,7 @@ type DeleteStickerSetP struct {
Name string `json:"name"`
}
func (api *Api) DeleteStickerSet(params DeleteStickerSetP) (bool, error) {
func (api *API) DeleteStickerSet(params DeleteStickerSetP) (bool, error) {
req := NewRequest[bool]("deleteStickerSet", params)
return req.Do(api)
}