Skip to content

πŸ™οΈπŸ’—πŸ­ Flexible and high-performance VK API module Go

License

Notifications You must be signed in to change notification settings

botscommunity/vkgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Bots Community

Flexible and high-performance VK API module Go

Instalation

go get github.com/botscommunity/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/botscommunity/vkgo/api"
  "github.com/botscommunity/vkgo/longpoll"
  "github.com/botscommunity/vkgo/scene"
  "github.com/botscommunity/vkgo/update"
  "os"
)

func main() {
  bot, err := api.New(os.Getenv("TOKEN"))
  if err != nil {
	  panic(err)
  }

  messageScene := scene.Message(func(bot *api.Bot, message update.Message) {
    bot.SendMessage(message.ChatID, "echo message: "+message.Text)
  })

  longpoll.Start(bot, messageScene)
}

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