Skip to content

dumpmemory/dingbot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dingbot

钉钉机器人 go库

钉钉官方文档

快速开始

    go get github.com/greycodee/dingbot

示例程序:

package main

import (
	"fmt"
	"github.com/greycodee/dingbot"
	"github.com/greycodee/dingbot/message"
	"time"
)


func main() {
	bot:= dingbot.DingBot{
		Secret:      "你的加签秘钥",
		AccessToken: "你的AccessToken【从钉钉机器人的url上获取】",
	}
	msg := message.Message{
		MsgType: message.TextStr,
		Text:    message.Text_{
			Content: "go-钉钉机器人测试",
		},
	}
	bot.Send(msg)

}

消息支持

  • text类型
  • link类型
  • markdown类型
  • 整体跳转ActionCard类型
  • 独立跳转ActionCard类型
  • FeedCard类型

使用

查看使用文档

About

钉钉机器人 go库

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%