Skip to content

botscommunity/icqgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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