Categorygithub.com/glide-im/robotic
modulepackage
1.3.0
Repository: https://github.com/glide-im/robotic.git
Documentation: pkg.go.dev

# README

Robotic

安装

go get github.com/glide-im/robotic

使用

这里实现了一个简单的 echo 机器人

botX := robotic.NewBotX("ws://bot_server.address", "Token")
botX.HandleChatMessage(func(m *messages.GlideMessage, cm *messages.ChatMessage) {
    if m.GetAction() == robotic.ActionChatMessage {
        go func() {
            replyMsg := messages.ChatMessage{
                CliMid:  uuid.New().String(),
                Mid:     0,
                From:    botX.Id,
                To:      cm.From,
                Type:    cm.Type,
                Content: cm.Content,
                SendAt:  time.Now().Unix(),
            }
            _ := botX.Send(cm.From, robotic.ActionChatMessage, &replyMsg)
        }()
    }
})
err = botX.Start(nil)
panic(err)

# Packages

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

# Functions

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

# Constants

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
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
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
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
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
No description provided by the author
No description provided by the author

# Variables

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

# Structs

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
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RobotConnection .
No description provided by the author
No description provided by the author

# Interfaces

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

# Type aliases

No description provided by the author
MessageHandler used to handle the message that robot received.
No description provided by the author
No description provided by the author