Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

个性化配置 #263

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions .env.example

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"remark": "^14.0.2",
"strip-markdown": "^5.0.0",
"wechaty": "^1.20.2",
"wechaty-puppet-padlocal": "^1.20.1",
"wechaty-puppet-wechat": "^1.18.4",
"wechaty-puppet-wechat4u": "^1.14.14",
"ws": "^8.16.0"
Expand Down
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Command } from 'commander'
import { WechatyBuilder, ScanStatus, log } from 'wechaty'
import { PuppetPadlocal } from 'wechaty-puppet-padlocal'
import inquirer from 'inquirer'
import qrTerminal from 'qrcode-terminal'
import dotenv from 'dotenv'
Expand Down Expand Up @@ -63,14 +64,14 @@ async function onMessage(msg) {
}

// 初始化机器人
const PADLOCAL_TOKEN = 'puppet_padlocal_63bf7a1e1c1a48358db0798ccbfcec38' // 替换为您的实际 token
const CHROME_BIN = process.env.CHROME_BIN ? { endpoint: process.env.CHROME_BIN } : {}
let serviceType = ''
export const bot = WechatyBuilder.build({
name: 'WechatEveryDay',
puppet: 'wechaty-puppet-wechat4u', // 如果有token,记得更换对应的puppet
puppet: new PuppetPadlocal({ token: PADLOCAL_TOKEN }), // 如果有token,记得更换对应的puppet
// puppet: 'wechaty-puppet-wechat', // 如果 wechaty-puppet-wechat 存在问题,也可以尝试使用上面的 wechaty-puppet-wechat4u ,记得安装 wechaty-puppet-wechat4u
puppetOptions: {
uos: true,
...CHROME_BIN,
},
})
Expand Down