github.com/aejoy/vkgo

🏙️💗🍭 Flexible and high-performance VK API module Go


License
MIT
Install
go get github.com/aejoy/vkgo

Documentation

Bots Community

Flexible and high-performance VK API module Go

Instalation

go get github.com/aejoy/vkgo

Getting started

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))
}

Help in solving problems

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