Categorygithub.com/botscommunity/icqgo
repository
0.0.1-dev
Repository: https://github.com/botscommunity/icqgo.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

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