Documentation ¶
Index ¶
- type Bot
- func (b *Bot) CallApi(action string, param interface{}) gjson.Result
- func (b *Bot) Do(i interface{})
- func (b *Bot) GetResponse(echo string) ([]byte, error)
- func (b *Bot) GetSelfId() int64
- func (b *Bot) SendGroupMsg(groupID int64, message interface{}) int32
- func (b *Bot) SendPrivateMsg(userID int64, message interface{}) int32
- type Driver
- func (d *Driver) GetBot(i int64) interface{}
- func (d *Driver) GetBots() map[int64]interface{}
- func (d *Driver) GetEvent() chan []byte
- func (d *Driver) OnConnect(f func(selfId int64, host string, clientRole string))
- func (d *Driver) OnDisConnect(f func(selfId int64))
- func (d *Driver) Run()
- func (d *Driver) ServeHTTP(writer http.ResponseWriter, request *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot @Description: bot实例对象
func (*Bot) Do ¶
func (b *Bot) Do(i interface{})
Do *
- @Description: 执行一个api的调用
- @receiver b
- @param i
- example
func (*Bot) GetResponse ¶
GetResponse *
- @Description: 获取一个api调用的响应
- @receiver b
- @param echo api调用的唯一标识
- @return []byte
- @return error
- example
func (*Bot) SendGroupMsg ¶
func (*Bot) SendPrivateMsg ¶
type Driver ¶
type Driver struct { Name string // contains filtered or unexported fields }
Driver @Description:
Click to show internal directories.
Click to hide internal directories.