Flexible and high-performance VK API module Go
go get github.com/aejoy/vkgo
Examples of working bots can be seen in the catalog /samples
A simple example of a LongPoll API Bot:
package main
import (
"github.com/aejoy/vkgo/api"
"github.com/aejoy/vkgo/longpoll"
"github.com/aejoy/vkgo/scene"
"github.com/aejoy/vkgo/update"
"log"
"os"
)
func main() {
bot, err := api.NewBot(os.Getenv("TOKEN"))
if err != nil { /* ... */
}
messages := scene.OnMessage(func(bot *api.API, message update.Message) {
bot.SendMessage(message.ChatID, message.Text)
})
log.Fatalln(longpoll.Start(bot, messages))
}
Don't know how to solve your problem? Ask the programmers from our community. There is a chance that they have already dealt with this problem and are ready to help you