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, title, about string, ...) (*tg.Channel, error)
- func CreateChat(context context.Context, client *tg.Client, title string, ...) (*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, peer tg.InputChannelClass, ...) (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, messageIds []tg.InputMessageClass) (tg.MessageClassArray, error)
- func GetEditMessageUpdate(upds tg.UpdatesClass) *tg.Message
- func GetInputPeerClassFromId(iD int64) tg.InputPeerClass
- func GetMessageFromMessageClass(m tg.MessageClass) *tg.Message
- func GetMessages(ctx context.Context, raw *tg.Client, chatId int64, mids []tg.InputMessageClass) (tg.MessageClassArray, error)
- func GetNewMessageUpdate(msgData *tg.Message, upds tg.UpdatesClass) *tg.Message
- func GetUpdateClassFromUpdatesClass(updates tg.UpdatesClass) (u []tg.UpdateClass)
- func PromoteChatMember(ctx context.Context, client *tg.Client, chat, user *storage.Peer, ...) (bool, error)
- func ReturnEditMessageWithError(upds tg.UpdatesClass, err error) (*tg.Message, error)
- func ReturnNewMessageWithError(msgData *tg.Message, upds tg.UpdatesClass, err error) (*tg.Message, error)
- func SavePeersFromClassArray(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, 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, messageIds []tg.InputMessageClass) (tg.MessageClassArray, error)
func GetEditMessageUpdate ¶
func GetEditMessageUpdate(upds tg.UpdatesClass) *tg.Message
func GetInputPeerClassFromId ¶
func GetInputPeerClassFromId(iD int64) tg.InputPeerClass
GetInputPeerClassFromId finds provided user id in the session storage and returns it if found.
func GetMessageFromMessageClass ¶
func GetMessageFromMessageClass(m tg.MessageClass) *tg.Message
func GetMessages ¶
func GetMessages(ctx context.Context, raw *tg.Client, chatId int64, mids []tg.InputMessageClass) (tg.MessageClassArray, error)
func GetNewMessageUpdate ¶
func GetUpdateClassFromUpdatesClass ¶
func GetUpdateClassFromUpdatesClass(updates tg.UpdatesClass) (u []tg.UpdateClass)
func PromoteChatMember ¶
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.
Click to show internal directories.
Click to hide internal directories.