Skip to content

Latest commit

History

History
46 lines (35 loc) 路 997 Bytes

README.md

File metadata and controls

46 lines (35 loc) 路 997 Bytes

Flexible and high-performance library for iCQ Bot API

Installation

go get github.com/botscommunity/icqgo

Getting Started

package main

import (
	"github.com/botscommunity/icqgo/API"
	"github.com/botscommunity/icqgo/longpoll"
	"github.com/joho/godotenv"
	"os"
)

func main() {
	godotenv.Load()

	var (
        bot = API.Create(os.Getenv("TOKEN"))
	    scenes = scene.Create()
    )

    scenes.Message(func(bot *API.Bot, message update.Message) {
		bot.SendMessage(message.Chat.ID, "echo message: " + message.Text)
	})

	longpoll.Create(bot, scenes).Listen()
}