This project is based on Wechaty and Puppeteer. Since new wechat account after 2017 can not use wechat web api, so we need to use puppeteer to simulate the login process (but it costs money). And it be written for our UTLeetcoder Project
If you want to run this bot locally, you need to do the following steps:
- clone this repo and then run
npm installto install all dependencies. - run
npm run demoto start the bot.
All bot commands are written in helper.ts. You can add your own commands in this file. And main.ts is the main file of this project which create a bot instance and then start the bot.
This bot can be called by @bot in wechat at index 0.
- get date statistics from UTLeetcoder provide json by provide message with head
@botandcheck daily xxxx-xx-xxwherexxxx-xx-xxis the date format you want to check. The bot will return the statistics of that day (but only top 3, cz may lots of data). - get weekly statistics from UTLeetcoder provide json by provide message with head
@botandcheck weeekly xxxx-xxwherexxxxstand for the year andxxstand for the week number. The bot will return the statistics of that week. - get specific user statistics from UTLeetcoder provide json by provide message with head
@botandcheck user xxxxwherexxxxis the user name (notice, we dont exactly know your query name so that we query all string followeduserplz type correct name). The bot will return the statistics of that user. - use davinci text model by provide message with head
@botandopenai prompt xxxxwherexxxxis the sentence you wanna ask or complete. - if you want request multiple statistics, you can provide message contain
@botand above commands split by;. The bot will return the statistics of all commands.
If you want to contribute to this project, you can fork this repo and then create a pull request. We will review your code and merge it if it is good.
If you have any questions, you can create an issue in this repo.