From ea7b3103f097a2a4eb39a63c9120bc3998e4d1b4 Mon Sep 17 00:00:00 2001 From: Jerryplusy Date: Fri, 29 Aug 2025 23:02:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=B8=BA=E6=88=B3=E6=88=B3=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=98=B5=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/poke.js | 6 ++++-- config/profile.json | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 config/profile.json diff --git a/apps/poke.js b/apps/poke.js index cd57a79..9adb36a 100644 --- a/apps/poke.js +++ b/apps/poke.js @@ -4,6 +4,7 @@ import axios from 'axios'; import configControl from '../lib/config/configControl.js'; const replyPoke = configControl.get('poke')?.replyPoke; +const nickName = configControl.get('profile')?.nickName; export default class ChuochuoPlugin extends plugin { constructor() { @@ -64,6 +65,7 @@ async function handleBotPoke(e) { const res = await axios.post(targetUrl, { type: 'poke', id: 'poke', + name: nickName, }); if (res.data.success) { await e.reply(res.data.data); @@ -72,10 +74,10 @@ async function handleBotPoke(e) { await e.bot.sendApi('group_poke', { group_id: e.group_id, user_id: e.operator_id }); } } else { - await e.reply(`戳一戳出错了!${configControl.get('nickName')}不知道该说啥好了..`); + await e.reply(`戳一戳出错了!${configControl.get('profile')?.nickName}不知道该说啥好了..`); } } catch (err) { logger.error('戳一戳请求失败', err); - await e.reply(`戳一戳出错了!${configControl.get('nickName')}不知道该说啥好了..`); + await e.reply(`戳一戳出错了!${configControl.get('profile')?.nickName}不知道该说啥好了..`); } } diff --git a/config/profile.json b/config/profile.json new file mode 100644 index 0000000..74e5e8d --- /dev/null +++ b/config/profile.json @@ -0,0 +1,3 @@ +{ + "nickName": "鸡气人" +}