Documentation ¶
Index ¶
- type Bot
- func (bot *Bot) Ban(objectID int) (ok bool, err *responses.Error)
- func (bot *Bot) BanUser(properties ...any) (ok bool, err *responses.Error)
- func (bot *Bot) Call(method string, queryParams string, responseStruct any) error
- func (bot *Bot) CreateChat(properties ...any) (chatID int, users []int, err *responses.Error)
- func (bot *Bot) DeleteMessage(properties ...any) (message responses.DeleteMessage, err *responses.Error)
- func (bot *Bot) DeleteMessages(properties ...any) (messages []responses.DeleteMessage, err *responses.Error)
- func (bot *Bot) EditMessage(properties ...any) (ok bool, err *responses.Error)
- func (bot *Bot) Execute(properties ...any) (result any, err *responses.Error)
- func (bot *Bot) GetBanned(properties ...any) (count int, bans []int, users []responses.User, err *responses.Error)
- func (bot *Bot) GetBannedUsers(properties ...any) (count int, bans []responses.BannedUser, err *responses.Error)
- func (bot *Bot) GetChat(properties ...any) (chat responses.Chat)
- func (bot *Bot) GetChatLink(properties ...any) (link string, err *responses.Error)
- func (bot *Bot) GetChatMembers(properties ...any) responses.ChatMembers
- func (bot *Bot) GetChats(properties ...any) responses.Chats
- func (bot *Bot) GetCounters() (responses.Counters, *responses.Error)
- func (bot *Bot) GetGifts(properties ...any) (count int, gifts []responses.Gift, err *responses.Error)
- func (bot *Bot) GetGroup(properties ...any) (group responses.Group)
- func (bot *Bot) GetGroupLongPollServer(properties ...any) responses.LongPollServer
- func (bot *Bot) GetHealth() (statuses []responses.HealthStatus, err *responses.Error)
- func (bot *Bot) GetHistoryMessages(properties ...any) responses.HistoryMessages
- func (bot *Bot) GetInfo(properties ...any) responses.Info
- func (bot *Bot) GetMessage(properties ...any) (count int, message update.Message, groups []responses.Group, ...)
- func (bot *Bot) GetMessages(properties ...any) responses.Messages
- func (bot *Bot) GetOffers(properties ...any) (count int, offers []int, err *responses.Error)
- func (bot *Bot) GetStatus(properties ...any) (text string, err *responses.Error)
- func (bot *Bot) GetStorage(properties ...any) (storages responses.Storages, err *responses.Error)
- func (bot *Bot) GetStorageKeys(userID int) (keys []string, err *responses.Error)
- func (bot *Bot) GetUploadMessagesDocumentServer(properties ...any) responses.UploadMessagesDocumentServer
- func (bot *Bot) GetUploadMessagesPhotoServer(property any) responses.UploadMessagesPhotoServer
- func (bot *Bot) GetUser(properties ...any) (user responses.User)
- func (bot *Bot) GetUserLongPollServer(properties ...any) responses.LongPollServer
- func (bot *Bot) GetUsers(properties ...any) ([]responses.User, *responses.Error)
- func (bot *Bot) Groups(properties ...any) (groups []responses.Group, err *responses.Error)
- func (bot *Bot) KickUser(properties ...any) (ok bool, err *responses.Error)
- func (bot *Bot) PinMessage(properties ...any) responses.PinMessage
- func (bot *Bot) ResolveDomain(properties ...any) (typ string, objectID int, err *responses.Error)
- func (bot *Bot) SaveUploadMessagesDocument(file string) (typ string, document responses.SaveUploadMessageDocument, err *responses.Error)
- func (bot *Bot) SaveUploadMessagesPhoto(server int, photo, hash string) (photos []responses.SaveUploadMessagesPhoto, err *responses.Error)
- func (bot *Bot) SendAnswerEvent(properties ...any) (ok bool, err *responses.Error)
- func (bot *Bot) SendMessage(properties ...any) (message responses.SendMessage)
- func (bot *Bot) SendMessages(properties ...any) (messages []responses.SendMessage, err *responses.Error)
- func (bot *Bot) SendSticker(chatID, stickerID int, properties ...any) (message responses.SendMessage)
- func (bot *Bot) SendStickers(chatID, stickerID int, properties ...any) ([]responses.SendMessage, *responses.Error)
- func (bot *Bot) SetGroupLongPollSettings(properties ...any) (ok bool, err *responses.Error)
- func (bot *Bot) SetGroupOffline(properties ...any) (ok bool, err *responses.Error)
- func (bot *Bot) SetGroupOnline(properties ...any) (ok bool, err *responses.Error)
- func (bot *Bot) SetJSON() string
- func (bot *Bot) SetMessagePack() string
- func (bot *Bot) SetOffline() (ok bool, err *responses.Error)
- func (bot *Bot) SetOnline(properties ...any) (ok bool, err *responses.Error)
- func (bot *Bot) SetStatus(properties ...any) (ok bool, err *responses.Error)
- func (bot *Bot) SetStorage(properties ...any) (result any, err *responses.Error)
- func (bot *Bot) Spam(properties ...any) (message responses.DeleteMessage, err *responses.Error)
- func (bot *Bot) Spams(properties ...any) (messages []responses.DeleteMessage, err *responses.Error)
- func (bot *Bot) Unban(objectID int) (ok bool, err *responses.Error)
- func (bot *Bot) UnbanUser(properties ...any) (ok bool, err *responses.Error)
- func (bot *Bot) UpdateWidgets(properties ...any) (ok bool, err *responses.Error)
- func (bot *Bot) UploadFile(serverURL, fileURL, field, name string) (uploadedFile UploadFile, err error)
- func (bot *Bot) UploadMessagesDocument(chatID int, fileURL, extension string) (typ string, document responses.SaveUploadMessageDocument, err *responses.Error)
- func (bot *Bot) UploadMessagesPhoto(chatID int, fileURL string) (photos []responses.SaveUploadMessagesPhoto, err *responses.Error)
- type Deprecated
- type UploadFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct { ID int `json:"id"` Token string `json:"token"` Version float32 `json:"version"` IsGroup bool `json:"is_group"` Deprecated Deprecated ContentType string Limit int *botsgo.Bot // contains filtered or unexported fields }
Bot ✨ is an object that defines the properties of a bot 🏙️ The ID is the unique identifier of the bot. It contains either a community ID or a user page ID 🏡 A token is a key to access your application (bot) ☕ Version - VK API version, it is strongly recommended to set 5.154000 📺 IsGroup is set automatically, guided by the information about the created bot 🧢 Logger is a pointer to the Logger object of the zap library. Used during development to detect problems during operation 👆 ContentType a simpler format of response data — https://en.wikipedia.org/wiki/MessagePack 💕 Limit - limiting the number of requests per second depending on the type of bot 🌿 errorHandler performs the task of transmitting an error for further processing.
func New ¶
New 📺 creating a page/community bot 🏙️ String - token 🎮 Float32 - version 💬 Int - page/community ID 💗 Bot{} - advanced settings 🍭 Returns an instance of the *Bot.
func (*Bot) Call ¶
Call 🔥🌅 sending an API request 🌌❄ The first argument is the name of the method, 🌺🌼🌹 the second is the URL string, 🦋🌹🎲 then usually a pointer to the structure where the response will be written 🌍🌊🐠 May return an error.
func (*Bot) CreateChat ¶
func (*Bot) DeleteMessage ¶
func (*Bot) DeleteMessages ¶
func (*Bot) EditMessage ¶
func (*Bot) GetBannedUsers ¶
func (*Bot) GetChatLink ¶
func (*Bot) GetChatMembers ¶
func (bot *Bot) GetChatMembers(properties ...any) responses.ChatMembers
func (*Bot) GetGroupLongPollServer ¶
func (bot *Bot) GetGroupLongPollServer(properties ...any) responses.LongPollServer
func (*Bot) GetHealth ¶
func (bot *Bot) GetHealth() (statuses []responses.HealthStatus, err *responses.Error)
func (*Bot) GetHistoryMessages ¶
func (bot *Bot) GetHistoryMessages(properties ...any) responses.HistoryMessages
func (*Bot) GetMessage ¶
func (*Bot) GetStorage ¶
func (*Bot) GetStorageKeys ¶
func (*Bot) GetUploadMessagesDocumentServer ¶
func (bot *Bot) GetUploadMessagesDocumentServer(properties ...any) responses.UploadMessagesDocumentServer
func (*Bot) GetUploadMessagesPhotoServer ¶
func (bot *Bot) GetUploadMessagesPhotoServer(property any) responses.UploadMessagesPhotoServer
func (*Bot) GetUserLongPollServer ¶
func (bot *Bot) GetUserLongPollServer(properties ...any) responses.LongPollServer
func (*Bot) PinMessage ¶
func (bot *Bot) PinMessage(properties ...any) responses.PinMessage
func (*Bot) ResolveDomain ¶
func (*Bot) SaveUploadMessagesDocument ¶
func (*Bot) SaveUploadMessagesPhoto ¶
func (*Bot) SendAnswerEvent ¶
func (*Bot) SendMessage ¶
func (bot *Bot) SendMessage(properties ...any) (message responses.SendMessage)
func (*Bot) SendMessages ¶
func (*Bot) SendSticker ¶
func (bot *Bot) SendSticker(chatID, stickerID int, properties ...any) (message responses.SendMessage)
func (*Bot) SendStickers ¶
func (*Bot) SetGroupLongPollSettings ¶
func (*Bot) SetGroupOffline ¶
func (*Bot) SetGroupOnline ¶
func (*Bot) SetMessagePack ¶
func (*Bot) SetStorage ¶
func (*Bot) UpdateWidgets ¶
func (*Bot) UploadFile ¶
func (bot *Bot) UploadFile(serverURL, fileURL, field, name string) (uploadedFile UploadFile, err error)
func (*Bot) UploadMessagesDocument ¶
func (*Bot) UploadMessagesPhoto ¶
type Deprecated ¶
type Deprecated struct {
Bot *Bot
}
type UploadFile ¶
type UploadFile []byte
func (UploadFile) JSON ¶
func (file UploadFile) JSON(data any) error
Source Files ¶
- api.go
- ban.go
- banUser.go
- chatControl.go
- config.go
- counters.go
- deleteMessage.go
- deprecatedMethods.go
- editMessage.go
- execute.go
- gifts.go
- group.go
- groupOnline.go
- health.go
- historyMessages.go
- info.go
- kickUser.go
- longPoll.go
- message.go
- offers.go
- pinMessage.go
- resolveDomain.go
- saveUploadMessagesDocument.go
- saveUploadMessagesPhoto.go
- sendEventMessage.go
- sendMessage.go
- setLongPollSettings.go
- setOnline.go
- status.go
- storage.go
- uploadFile.go
- uploadMessagesDocument.go
- uploadMessagesDocumentServer.go
- uploadMessagesPhoto.go
- uploadMessagesPhotoServer.go
- user.go
- widgets.go