Skip to content

wnwd/waline-notification-wecom-group-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

waline-notification-wecom-group-bot

A Waline plugin that provide wecome group bot notification spport.

中文文档 | English Doc

How to install

npm install waline-notification-wecom-group-bot

How to use

Edit your Waline File:

index.js

const Application = require('@waline/vercel');
const WecomGroupBot = require('waline-notification-wecom-group-bot');

module.exports = Application({
  plugins: [WecomGroupBot],
  async postSave(comment) {
    // do what ever you want after comment saved
  },
});

package.json

Add "waline-notification-wecom-group-bot": "latest" into package.json dependencies.

Environment Variables

  • WECOM_GROUP_WEBHOOK: Wecom group bot webhook URL. e.g. https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=b55f4f3c-478c-4256-8ba9-cf217f288987
  • SITE_NAME: Your site name, used for display in notification message.
  • SITE_URL: Your site URL, used for display in notification message.
  • WECOM_TEMPLATE: (optional) Your custom notification template, please refer this document.

The default template is as follow:

{{site.name|safe}}有新评论啦
【昵称】:{{self.nick}}
【邮箱】:{{self.mail}}
【内容】:{{self.comment}}
【地址】:{{site.postUrl}}

You need redeploy after change environment variables.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors