Skip to content

Commit

Permalink
refactor(push): 移除 OneBot 消息类型配置项
Browse files Browse the repository at this point in the history
移除了代码中不必要的 OneBotMsgType 类型定义和相关配置项。简化了 OneBot 推送配置结构,不再需要指定消息类型。
  • Loading branch information
h7ml committed Dec 31, 2024
1 parent 6199104 commit e455e10
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49133,7 +49133,7 @@ async function runPushAllInOne(title, desp, type, pushConfig) {
return response;
}
case 'OneBot': {
const { ONE_BOT_BASE_URL, ONE_BOT_ACCESS_TOKEN, ONE_BOT_MSG_TYPE, ONE_BOT_RECIEVER_ID, } = pushConfig[type];
const { ONE_BOT_BASE_URL, ONE_BOT_ACCESS_TOKEN, ONE_BOT_RECIEVER_ID, } = pushConfig[type];
const oneBot = new push_all_in_one_1.OneBot({
ONE_BOT_BASE_URL,
ONE_BOT_ACCESS_TOKEN,
Expand Down
1 change: 0 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type {
CustomEmailType,
OneBotMsgType,
PushDeerPushType,
PushPlusChannelType,
PushPlusTemplateType,
Expand Down
1 change: 0 additions & 1 deletion src/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ export async function runPushAllInOne(
const {
ONE_BOT_BASE_URL,
ONE_BOT_ACCESS_TOKEN,
ONE_BOT_MSG_TYPE,
ONE_BOT_RECIEVER_ID,
} = pushConfig[type]
const oneBot = new OneBot({
Expand Down
1 change: 0 additions & 1 deletion src/type.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type {
CustomEmailType,
OneBotMsgType,
PushDeerPushType,
PushPlusChannelType,
PushPlusTemplateType,
Expand Down

0 comments on commit e455e10

Please sign in to comment.