Git Product home page Git Product logo

fish-touching-bot's Introduction

摸鱼办

Node.js v16

🤖 摸鱼办:一个每天按时提醒你摸鱼的微信机器人。

此项目基于 wechaty-puppet-wechat 协议,核心原理是通过 HTTP 调用网页 API,不需要 token 即可使用。
注意:若要基于本项目使用 wechaty-puppet-padlocal 协议,需自行安装 padlocal 依赖。并且把 wechaty 版本降到 0.60.1 版本。点此查看 padlocal-demo
更多协议请参考:https://wechaty.js.org/docs/puppet-providers/

功能

  • 工作时间内,每小时播报【摸鱼办】提醒信息(群提醒)。
  • 输入'摸鱼'可查看当前【摸鱼办】提醒信息。
  • 每天早上按时播报当天气候(群提醒)。
  • 输入'天气'可查询当前气温。
  • 下班时间提醒,给予亲切的下班问候(群提醒)。
  • 其他:可自行扩展。

注:要添加其他功能具体请看Wechaty API 文档

运行

1. Clone project.

$ git clone https://github.com/zoudingyi/fish-touching-bot.git

2. Install Node dependencies.

$ cd fish-touching-bot
$ npm install

2. Set congfig.ts

const config = {
  name: 'BotName', // 机器人名称
  token: '',
  roomName: '摸鱼办' // 需要发起摸鱼提醒的群聊
  payDay: 15, // 发工资的日期
  workStartTime: '9:00', // 上班时间
  workEndTime: '18:00', // 下班时间
  weaRule: { tz: 'Asia/Shanghai', rule: '0 30 8 * * *' }, // 每日的天气预报提醒时间
  fishRule: {}, // 摸鱼提醒时间
  leaveWorkRule: {} // 下班提醒时间
};
// 具体时间设置格式请看schedule.ts文件

3. Starter Bot.

$ npm run dev

效果图

1.每小时播报(群内提醒)

效果图

2.下班提醒(群内提醒)

效果图

3.天气查询 (群内或单独给机器人发消息都可查询)

效果图

其他

用到的时间处理工具:
dayjs
node-schedule

fish-touching-bot's People

Contributors

zoudingyi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.