From f364d7fb3c36b908f6e77f66c856278766e6e108 Mon Sep 17 00:00:00 2001 From: Kirikaze Chiyuki Date: Thu, 19 Dec 2024 19:09:52 +0800 Subject: [PATCH] update channel bot --- channel_bot/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/channel_bot/index.js b/channel_bot/index.js index 21d412f..06b3749 100644 --- a/channel_bot/index.js +++ b/channel_bot/index.js @@ -4,7 +4,12 @@ import escapeHTML from 'escape-html' const SITE = 'blog.chyk.ink' const { BOT_TOKEN, CHANNEL_CHAT_ID, STEL_IVS, STEL_SSID, STEL_TOKEN } = process.env -const { URL_TO_PROCESS } = process.env + +const URL_TO_PROCESS = process.argv[2] // 从命令行参数获取 URL + +if (!URL_TO_PROCESS) { + console.error('Error: 请提供一个 URL 作为参数。') +} const Message = (() => { const FORMAT_CHAR = String.fromCharCode(27)