Documentation ¶
Index ¶
- func AddChatMembers(context context.Context, client *tg.Client, chatPeer tg.InputPeerClass, ...) (bool, error)
- func ArchiveChats(context context.Context, client *tg.Client, peers []tg.InputPeerClass) (bool, error)
- func BanChatMember(context context.Context, client *tg.Client, chatPeer tg.InputPeerClass, ...) (tg.UpdatesClass, error)
- func CreateChannel(context context.Context, client *tg.Client, p *storage.PeerStorage, ...) (*tg.Channel, error)
- func CreateChat(context context.Context, client *tg.Client, p *storage.PeerStorage, ...) (*tg.Chat, error)
- func DecodeStringToSession(sessionString string) (*storage.Session, error)
- func DemoteChatMember(ctx context.Context, client *tg.Client, chat, user *storage.Peer, ...) (bool, error)
- func EncodeSessionToString(session *storage.Session) (string, error)
- func GetChannelMessages(context context.Context, client *tg.Client, p *storage.PeerStorage, ...) (tg.MessageClassArray, error)
- func GetChatFromPeer(ctx context.Context, client *tg.Client, peer tg.PeerClass) (*tg.ChatFull, error)
- func GetChatIdFromPeer(peer tg.PeerClass) int64
- func GetChatMessages(context context.Context, client *tg.Client, p *storage.PeerStorage, ...) (tg.MessageClassArray, error)
- func GetEditMessageUpdate(upds tg.UpdatesClass, p *storage.PeerStorage) *tg.Message
- func GetInputFileLocation(media tg.MessageMediaClass) (tg.InputFileLocationClass, error)
- func GetInputPeerClassFromId(p *storage.PeerStorage, iD int64) tg.InputPeerClass
- func GetMediaFileName(media tg.MessageMediaClass) (string, error)
- func GetMediaFileNameWithId(media tg.MessageMediaClass) (string, error)
- func GetMessageFromMessageClass(m tg.MessageClass) *tg.Message
- func GetMessages(ctx context.Context, raw *tg.Client, p *storage.PeerStorage, chatId int64, ...) (tg.MessageClassArray, error)
- func GetNewMessageUpdate(msgData *tg.Message, upds tg.UpdatesClass, p *storage.PeerStorage) *tg.Message
- func GetUpdateClassFromUpdatesClass(updates tg.UpdatesClass, p *storage.PeerStorage) (u []tg.UpdateClass)
- func PromoteChatMember(ctx context.Context, client *tg.Client, chat, user *storage.Peer, ...) (bool, error)
- func ReturnEditMessageWithError(p *storage.PeerStorage, upds tg.UpdatesClass, err error) (*tg.Message, error)
- func ReturnNewMessageWithError(msgData *tg.Message, upds tg.UpdatesClass, p *storage.PeerStorage, err error) (*tg.Message, error)
- func SavePeersFromClassArray(p *storage.PeerStorage, cs []tg.ChatClass, us []tg.UserClass)
- func UnarchiveChats(context context.Context, client *tg.Client, peers []tg.InputPeerClass) (bool, error)
- func UnbanChatMember(context context.Context, client *tg.Client, chatPeer *tg.InputPeerChannel, ...) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddChatMembers ¶
func ArchiveChats ¶
func BanChatMember ¶
func BanChatMember(context context.Context, client *tg.Client, chatPeer tg.InputPeerClass, userPeer *tg.InputPeerUser, untilDate int) (tg.UpdatesClass, error)
func CreateChannel ¶
func CreateChat ¶
func DecodeStringToSession ¶
DecodeStringToSession decodes the provided base64 encoded session string to session.Data.
func DemoteChatMember ¶
func EncodeSessionToString ¶
EncodeSessionToString encodes the provided session to a string in base64 using json bytes.
func GetChannelMessages ¶
func GetChannelMessages(context context.Context, client *tg.Client, p *storage.PeerStorage, peer tg.InputChannelClass, messageIds []tg.InputMessageClass) (tg.MessageClassArray, error)
func GetChatFromPeer ¶
func GetChatFromPeer(ctx context.Context, client *tg.Client, peer tg.PeerClass) (*tg.ChatFull, error)
GetChatFromPeer returns the tg.ChatFull data of the provided tg.PeerClass.
func GetChatIdFromPeer ¶
GetChatIdFromPeer returns the chat/user id from the provided tg.PeerClass.
func GetChatMessages ¶
func GetChatMessages(context context.Context, client *tg.Client, p *storage.PeerStorage, messageIds []tg.InputMessageClass) (tg.MessageClassArray, error)
func GetEditMessageUpdate ¶
func GetEditMessageUpdate(upds tg.UpdatesClass, p *storage.PeerStorage) *tg.Message
func GetInputFileLocation ¶
func GetInputFileLocation(media tg.MessageMediaClass) (tg.InputFileLocationClass, error)
GetInputFileLocation Returns tg.InputFileLocationClass, which can be used to download media used by ext.DownloadMedia()
func GetInputPeerClassFromId ¶
func GetInputPeerClassFromId(p *storage.PeerStorage, iD int64) tg.InputPeerClass
GetInputPeerClassFromId finds provided user id in the session storage and returns it if found.
func GetMediaFileName ¶
func GetMediaFileName(media tg.MessageMediaClass) (string, error)
GetMediaFileName Return media's filename in format "{name}.{extension}" Warning, stickers will always have name "sticker.webp", if you need distinction, use GetMediaFileNameWithId
func GetMediaFileNameWithId ¶
func GetMediaFileNameWithId(media tg.MessageMediaClass) (string, error)
GetMediaFileNameWithId Return media's filename in format "{id}-{name}.{extension}"
func GetMessageFromMessageClass ¶
func GetMessageFromMessageClass(m tg.MessageClass) *tg.Message
func GetMessages ¶
func GetMessages(ctx context.Context, raw *tg.Client, p *storage.PeerStorage, chatId int64, mids []tg.InputMessageClass) (tg.MessageClassArray, error)
func GetNewMessageUpdate ¶
func GetNewMessageUpdate(msgData *tg.Message, upds tg.UpdatesClass, p *storage.PeerStorage) *tg.Message
func GetUpdateClassFromUpdatesClass ¶
func GetUpdateClassFromUpdatesClass(updates tg.UpdatesClass, p *storage.PeerStorage) (u []tg.UpdateClass)
func PromoteChatMember ¶
func ReturnEditMessageWithError ¶
func ReturnEditMessageWithError(p *storage.PeerStorage, upds tg.UpdatesClass, err error) (*tg.Message, error)
func ReturnNewMessageWithError ¶
func ReturnNewMessageWithError(msgData *tg.Message, upds tg.UpdatesClass, p *storage.PeerStorage, err error) (*tg.Message, error)
func SavePeersFromClassArray ¶
func UnarchiveChats ¶
func UnbanChatMember ¶
func UnbanChatMember(context context.Context, client *tg.Client, chatPeer *tg.InputPeerChannel, userPeer *tg.InputPeerUser) (bool, error)
Types ¶
This section is empty.