Documentation
¶
Index ¶
- func BotAuthorize(apiIdRaw, apiHash string, botToken string) (tClient *client.Client, err error)
- func CheckBotUsernameByUserID(userID int64) (string, bool, error)
- func ClientAuthorize(apiIdRaw, apiHash string) (tClient *client.Client, err error)
- func GetChat(chatID int64) (*client.Chat, error)
- func GetChatTitle(chatID int64) (string, error)
- func GetMessage(chatID, messageID int64) (*client.Message, error)
- func GetMessageFormattedText(mc client.MessageContent) *client.FormattedText
- func GetMessageLink(chatID, messageID int64, mediaTimestamp int32, forAlbum bool, ...) (*client.MessageLink, error)
- func GetSenderChatID(message *client.Message) (int64, error)
- func GetSenderID(message *client.Message) (int64, error)
- func GetSenderUserID(message *client.Message) (int64, error)
- func GetSupergroupByID(id int64) (*client.Supergroup, error)
- func GetSupergroupUsernamesByID(id int64) ([]string, error)
- func GetUserByID(userID int64) (*client.User, error)
- func GetUserFirstLastName(userID int64) (string, string, error)
- func GetUsernameByID(userID int64) (string, error)
- func GetUsernamesByID(userID int64) ([]string, error)
- func IsViaBotByUserID(userID int64, viaBotUserId int64) (bool, error)
- func ReportMessage(chatID, messageID int64, reason client.ReportReason, text string) (*client.Ok, error)
- func SendMessageText(text string, chatID int64) (*client.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BotAuthorize ¶
Authorize logs the bot into the provided account using tdlib.
func ClientAuthorize ¶
func GetChat ¶
GetChat retrieves a chat by its chatID. It may be required before the bot is able to send messages to a certain chat, if it hasn't received updates from it.
func GetChatTitle ¶ added in v0.1.3
func GetMessage ¶
GetMessage returns the client.Message with the input messageID in the input chatID.
func GetMessageFormattedText ¶
func GetMessageFormattedText(mc client.MessageContent) *client.FormattedText
GetMessageFormattedText returns the client.FormattedText structure for supported message types, nil otherwise.
func GetMessageLink ¶
func GetMessageLink(chatID, messageID int64, mediaTimestamp int32, forAlbum bool, inMessageThread bool) (*client.MessageLink, error)
获取消息链接
func GetSenderUserID ¶
GetSenderUserID returns the sender user id, if the message was not sent on behalf of a chat
func GetSupergroupByID ¶ added in v0.1.3
func GetSupergroupByID(id int64) (*client.Supergroup, error)
func GetSupergroupUsernamesByID ¶ added in v0.1.3
func GetUserByID ¶
GetUserByID returns a client.User given a userID.
func GetUserFirstLastName ¶ added in v0.1.3
func GetUsernameByID ¶ added in v0.0.3
func GetUsernamesByID ¶
func ReportMessage ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.