-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from choogoo/v2.x
v2.0.2
- Loading branch information
Showing
146 changed files
with
4,433 additions
and
9,535 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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# 维格表配置 | ||
VIKA_SPACE_NAME="" # 维格表空间名称,注意是名称而不是ID | ||
VIKA_TOKEN="" #维格表token | ||
|
||
# Wechaty配置 | ||
WECHATY_PUPPET="wechaty-puppet-wechat" # 可选值:wechaty-puppet-wechat4u、wechaty-puppet-wechat、wechaty-puppet-xp、wechaty-puppet-engine、wechaty-puppet-padlocal、wechaty-puppet-service | ||
WECHATY_TOKEN="" # 使用wechaty-puppet-padlocal、wechaty-puppet-service时需配置此token | ||
|
||
# 基础配置 | ||
ADMINROOM_ADMINROOMID="" # 管理群ID,与管理员群名称任选其一,群ID优先级高于群名称 | ||
ADMINROOM_ADMINROOMTOPIC="瓦力是群主" # 管理群名称,需尽量保持名称复杂,避免重名群干扰 | ||
BASE_WELCOM_EMESSAGE_FOR_JOIN_ROOM="" # 默认进群欢迎语 | ||
BASE_WELCOME_MESSAGE_FOR_ADD_FRIEND="" # 默认添加好友自动回复 | ||
|
||
# 智能问答配置 | ||
AUTOQA_TYPE="wxOpenai" # TBD-可选值:WxOpenai、ChatGPT | ||
WXOPENAI_TOKEN="" # 微信对话开放平台中获取 | ||
WXOPENAI_ENCODINGAESKEY="" # 微信对话开放平台中获取 | ||
CHATGPT_KEY="" # openai key | ||
CHATGPT_ENDPOINT="https://www.openai.com" # openai api请求地址,国内使用官方api可以替换为https://www.openai-proxy.com | ||
|
||
# MQTT配置 | ||
MQTT_USERNAME="" # MQTT连接配置信息,推荐使用百度云的物联网核心套件 | ||
MQTT_PASSWORD="" # MQTT连接配置信息,推荐使用百度云的物联网核心套件 | ||
MQTT_ENDPOINT="" # MQTT连接配置信息,推荐使用百度云的物联网核心套件 | ||
MQTT_PORT=1883 # MQTT连接配置信息,推荐使用百度云的物联网核心套件 | ||
|
||
# 消息推送目的地配置 | ||
WEBHOOK_URL="" | ||
WEBHOOK_TOKEN="" | ||
WEBHOOK_USERNAME="" | ||
WEBHOOK_PASSWORD="" | ||
|
||
# 语雀配置 | ||
YUQUE_TOKEN="" | ||
YUQUE_NAMESPACE="" | ||
|
||
# 功能开关 | ||
AUTOQA_AUTOREPLY=true | ||
AUTOQA_ATREPLY=false | ||
AUTOQA_CUSTOMREPLY=false | ||
AUTOQA_ROOMWHITELIST=true | ||
AUTOQA_CONTACTWHITELIST=false | ||
|
||
VIKA_USEVIKA=false | ||
VIKA_UPLOADMESSAGETOVIKA=false | ||
VIKA_AUTOMATICCLOUD=false | ||
|
||
WEBHOOK_WEBHOOKMESSAGEPUSH=false | ||
|
||
MQTT_MQTTMESSAGEPUSH=false | ||
MQTT_MQTTCONTROL=true | ||
|
||
IM_IMCHAT=false |
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,8 +1,11 @@ | ||
|
||
const rules = { | ||
'multiline-ternary': 'off', | ||
} | ||
|
||
module.exports = { | ||
extends: '@chatie', | ||
parserOptions: { | ||
project: './tsconfig.json', // 更改为正确的路径 | ||
}, | ||
rules, | ||
} |
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,8 +1,17 @@ | ||
FROM node:16 | ||
# 使用Alpine Linux作为基础镜像 | ||
FROM node:16-alpine | ||
|
||
# 设置工作目录 | ||
WORKDIR /usr/src/app | ||
COPY package.json ./ | ||
|
||
# 复制 package.json 和 package-lock.json(如果存在) | ||
COPY package*.json ./ | ||
|
||
# 安装依赖 | ||
RUN npm install | ||
|
||
# 复制所有文件到工作目录 | ||
COPY . . | ||
CMD [ "npm","run", "init" ] | ||
CMD [ "npm","run", "start" ] | ||
|
||
# 设置默认启动命令 | ||
CMD ["sh", "-c", "npm run init && npm run start"] |
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
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
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
File renamed without changes.
0
download-install-and-run.sh → download-install-and-run-mac.command
100644 → 100755
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env -S node --no-warnings --loader ts-node/esm | ||
import 'dotenv/config.js' | ||
import { | ||
log, | ||
WechatyBuilder, | ||
} from 'wechaty' | ||
|
||
import { ChatFlow, config, getBotOps } from '../src/chatflow.js' | ||
|
||
// 构建机器人 | ||
const ops = getBotOps(config.botConfig.wechaty.puppet, config.botConfig.wechaty.token) | ||
const bot = WechatyBuilder.build(ops) | ||
|
||
bot.use(ChatFlow(config)) | ||
bot.start() | ||
.then(() => log.info('\n================================\n\n机器人启动,如出现二维码,请使用微信扫码登录\n\n================================')) | ||
.catch((e: any) => log.error('机器人运行异常:', JSON.stringify(e))) |
Oops, something went wrong.