🎨 签到优化与配置修改

This commit is contained in:
HibiKier
2024-08-24 17:06:23 +08:00
parent 28b7415581
commit f69253616e
34 changed files with 202 additions and 128 deletions
+7 -9
View File
@@ -11,7 +11,7 @@ from nonebot.plugin import PluginMetadata
from nonebot_plugin_apscheduler import scheduler
from nonebot_plugin_session import EventSession
from zhenxun.configs.config import NICKNAME, Config
from zhenxun.configs.config import BotConfig, Config
from zhenxun.configs.utils import PluginExtraData, RegisterConfig
from zhenxun.models.fg_request import FgRequest
from zhenxun.models.friend_user import FriendUser
@@ -78,7 +78,6 @@ async def _(bot: v12Bot | v11Bot, event: FriendRequestEvent, session: EventSessi
# age = str(user["age"])
comment = event.comment
if superuser:
superuser = int(superuser)
await MessageUtils.build_message(
f"*****一份好友申请*****\n"
f"昵称:{nickname}({event.user_id})\n"
@@ -165,15 +164,14 @@ async def _(bot: v12Bot | v11Bot, event: GroupRequestEvent, session: EventSessio
target=event.group_id,
)
nickname = await FriendUser.get_user_name(str(event.user_id))
await Text(
f"*****一份入群申请*****\n"
f"申请人:{nickname}({event.user_id})\n"
f"群聊:{event.group_id}\n"
f"邀请日期:{datetime.now().replace(microsecond=0)}"
).send_to(target=TargetQQPrivate(user_id=superuser), bot=bot)
await PlatformUtils.send_superuser(
bot,
f"*****一份入群申请*****\n申请人:{nickname}({event.user_id})\n群聊:{event.group_id}\n邀请日期:{datetime.now().replace(microsecond=0)}",
superuser,
)
await bot.send_private_msg(
user_id=event.user_id,
message=f"想要邀请我偷偷入群嘛~已经提醒{NICKNAME}的管理员大人了\n"
message=f"想要邀请我偷偷入群嘛~已经提醒{BotConfig.nickname}的管理员大人了\n"
"请确保已经群主或群管理沟通过!\n"
"等待管理员处理吧!",
)