generic

package
v1.0.0-beta18 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddChatMembers

func AddChatMembers[chatUnion ChatUnion](ctx *ext.Context, chat chatUnion, userIds []int64, forwardLimit int) (bool, error)

AddChatMembers is a generic helper for ext.Context.AddChatMembers method.

func BanChatMember

func BanChatMember[chatUnion ChatUnion](ctx *ext.Context, chat, user chatUnion, untilDate int) (tg.UpdatesClass, error)

BanChatMember is a generic helper for ext.Context.BanChatMember method.

func DeleteMessages

func DeleteMessages[chatUnion ChatUnion](ctx *ext.Context, chat chatUnion, messageIDs []int) error

DeleteMessages is a generic helper for ext.Context.DeleteMessages method.

func DemoteChatMember

func DemoteChatMember[chatUnion ChatUnion](ctx *ext.Context, chat, user chatUnion, opts *ext.EditAdminOpts) (bool, error)

DemoteChatMember is a generic helper for ext.Context.DemoteChatMember method.

func EditMessage

func EditMessage[chatUnion ChatUnion](ctx *ext.Context, chat chatUnion, request *tg.MessagesEditMessageRequest) (*types.Message, error)

EditMessage is a generic helper for ext.Context.EditMessage method.

func GetChat

func GetChat[chatUnion ChatUnion](ctx *ext.Context, chat chatUnion) (tg.ChatFullClass, error)

GetChat is a generic helper for ext.Context.GetChat method.

func GetInlineBotResults

func GetInlineBotResults[chatUnion ChatUnion](ctx *ext.Context, chat chatUnion, botUsername string, request *tg.MessagesGetInlineBotResultsRequest) (*tg.MessagesBotResults, error)

GetInlineBotResults is a generic helper for ext.Context.GetInlineBotResults method.

func GetMessages

func GetMessages[chatUnion ChatUnion](ctx *ext.Context, chat chatUnion, messageIds []tg.InputMessageClass) ([]tg.MessageClass, error)

GetMessages is a generic helper for ext.Context.GetMessages method.

func GetUser

func GetUser[chatUnion ChatUnion](ctx *ext.Context, user chatUnion) (*tg.UserFull, error)

GetUser is a generic helper for ext.Context.GetUser method.

func GetUserProfilePhotos

func GetUserProfilePhotos[chatUnion ChatUnion](ctx *ext.Context, user chatUnion, opts *tg.PhotosGetUserPhotosRequest) ([]tg.PhotoClass, error)

GetUserProfilePhotos is a generic helper for ext.Context.GetUserProfilePhotos method.

func PromoteChatMember

func PromoteChatMember[chatUnion ChatUnion](ctx *ext.Context, chat, user chatUnion, opts *ext.EditAdminOpts) (bool, error)

PromoteChatMember is a generic helper for ext.Context.PromoteChatMember method.

func SendInlineBotResult

func SendInlineBotResult[chatUnion ChatUnion](ctx *ext.Context, chat chatUnion, request *tg.MessagesSendInlineBotResultRequest) (tg.UpdatesClass, error)

SendInlineBotResult is a generic helper for ext.Context.SendInlineBotResult method.

func SendMedia

func SendMedia[chatUnion ChatUnion](ctx *ext.Context, chat chatUnion, request *tg.MessagesSendMediaRequest) (*types.Message, error)

SendMedia is a generic helper for ext.Context.SendMedia method.

func SendMessage

func SendMessage[chatUnion ChatUnion](ctx *ext.Context, chat chatUnion, request *tg.MessagesSendMessageRequest) (*types.Message, error)

SendMessage is a generic helper for ext.Context.SendMessage method.

func SendMultiMedia

func SendMultiMedia[chatUnion ChatUnion](ctx *ext.Context, chat chatUnion, request *tg.MessagesSendMultiMediaRequest) (*types.Message, error)

SendMultiMedia is a generic helper for ext.Context.SendMultiMedia method.

func SendReaction

func SendReaction[chatUnion ChatUnion](ctx *ext.Context, chat chatUnion, request *tg.MessagesSendReactionRequest) (*types.Message, error)

SendReaction is a generic helper for ext.Context.SendReaction method.

func UnbanChatMember

func UnbanChatMember[chatUnion ChatUnion](ctx *ext.Context, chat, user chatUnion) (bool, error)

UnbanChatMember is a generic helper for ext.Context.UnbanChatMember method.

Types

type ChatUnion

type ChatUnion interface {
	int | int64 | string
}

Jump to

Keyboard shortcuts

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