bot_manage

package
v1.0.0-beta.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package bot_manage 机器人/机器人信息和管理

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(ctx *feishu.App, payload []byte) (resp []byte, err error)

拉机器人进群

拉机器人进群

**权限说明** :需要启用机器人能力;机器人的owner需要已经在群里

See: https://open.feishu.cn/document/ukTMukTMukTM/uYDO04iN4QjL2gDN

POST https://open.feishu.cn/open-apis/bot/v4/add

Example
package main

import (
	"fmt"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/bot/bot_manage"
)

func main() {
	var ctx *feishu.App

	payload := []byte("{}")
	resp, err := bot_manage.Add(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func Info

func Info(ctx *feishu.App) (resp []byte, err error)

获取机器人信息

获取机器人的基本信息

**权限说明** :需要启用机器人能力

See: https://open.feishu.cn/document/ukTMukTMukTM/uAjMxEjLwITMx4CMyETM

GET https://open.feishu.cn/open-apis/bot/v3/info/

Example
package main

import (
	"fmt"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/bot/bot_manage"
)

func main() {
	var ctx *feishu.App

	resp, err := bot_manage.Info(ctx)

	fmt.Println(resp, err)
}
Output:

func Remove

func Remove(ctx *feishu.App, payload []byte) (resp []byte, err error)

将机器人移出群

将机器人移出群。

**权限说明** :需要启用机器人能力

See: https://open.feishu.cn/document/ukTMukTMukTM/ucDO04yN4QjL3gDN

POST https://open.feishu.cn/open-apis/bot/v4/remove

Example
package main

import (
	"fmt"

	"github.com/ylck/feishu"
	"github.com/ylck/feishu/apis/bot/bot_manage"
)

func main() {
	var ctx *feishu.App

	payload := []byte("{}")
	resp, err := bot_manage.Remove(ctx, payload)

	fmt.Println(resp, err)
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL