-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
48 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
## 更新日志 | ||
### V4.2.7(2022-12-20) | ||
|
||
一、更新插件版本,增加ipad协议支持 | ||
|
||
### V4.2.5(2022-12-07) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,37 @@ | ||
import { WechatyBuilder } from 'wechaty' | ||
import { WechatyWebPanelPlugin } from 'wechaty-web-panel' | ||
import {WechatyBuilder} from 'wechaty' | ||
import {WechatyWebPanelPlugin} from 'wechaty-web-panel' | ||
|
||
const name = 'wechat-assistant-pro'; | ||
let bot = ''; | ||
let padLocalToken = '' // 如果申请了ipadlocal的token,可以直接填入 | ||
|
||
if (process.env['PAD_LOCAL_TOKEN']) { | ||
console.log('读取到环境变量中的ipadLocalToken') | ||
padLocalToken = process.env['PAD_LOCAL_TOKEN'] | ||
} | ||
|
||
console.log('默认使用uos web版微信协议') | ||
bot = WechatyBuilder.build({ | ||
name, // generate xxxx.memory-card.json and save login data for the next login | ||
puppetOptions: { | ||
uos: true | ||
}, | ||
puppet: 'wechaty-puppet-wechat', | ||
}); | ||
if (padLocalToken) { | ||
console.log('读取到环境变量中的ipad token 使用ipad协议启动') | ||
bot = WechatyBuilder.build({ | ||
name, // generate xxxx.memory-card.json and save login data for the next login | ||
puppetOptions: { | ||
token: padLocalToken | ||
}, puppet: 'wechaty-puppet-padlocal', | ||
}); | ||
|
||
} else { | ||
console.log('默认使用uos web协议启动') | ||
bot = WechatyBuilder.build({ | ||
name, // generate xxxx.memory-card.json and save login data for the next login | ||
puppetOptions: { | ||
uos: true | ||
}, puppet: 'wechaty-puppet-wechat', | ||
}); | ||
} | ||
|
||
bot.use( | ||
WechatyWebPanelPlugin({ | ||
apiKey: '***', | ||
apiSecret: '****', | ||
}) | ||
) | ||
bot.start() | ||
.catch((e) => console.error(e)); | ||
|
||
bot.use(WechatyWebPanelPlugin({ | ||
apiKey: '***', apiSecret: '****', | ||
})) | ||
bot.start() | ||
.catch((e) => console.error(e)); |