mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-09-30 01:00:02 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b65ac2126 | ||
|
|
3611678e13 |
@@ -656,22 +656,19 @@ python bot.py
|
||||
### 2021/8/10
|
||||
|
||||
* 重复的好友请求和邀群提示在5分钟内不会重复提示
|
||||
* 疫情会优先检查城市,城市省份市区重名时请添加‘市’
|
||||
* 疫情会优先检查城市,城市省份重名时请添加‘省’
|
||||
* 添加命令‘原神资源查找’,‘设置cookie’
|
||||
* 添加配置AUTO_UPDATE_ZHENXUN,是否自动更新真寻,默认True
|
||||
* 添加配置MAX_RUSSIAN_BET_GOLD,俄罗斯轮盘赌注最大金额,默认1000
|
||||
* 检查更新真寻定时任务时间改为12 : 00
|
||||
* 检查更新真寻定时任务时间改为每日12 : 00
|
||||
* 添加功能能不能好好说话(nbnhhsh)
|
||||
* 添加功能随机roll,无参为数字,有参为随机参数
|
||||
* 添加linux重启脚本以及重启命令‘重启’(建议首次生成restart.sh先查看命令是否正确)
|
||||
* 修复管理员功能的权限检测
|
||||
* 修复丢人爬开关
|
||||
|
||||
### 2021/8/6
|
||||
|
||||
* 天气查询会优先遍历城市
|
||||
* 添加自动更新真寻命令
|
||||
|
||||
##### 如果你的版本为 2021/8/4,可以直接复制plugins/check_zhenxun_update后,通过指令来更新真寻
|
||||
|
||||
### 2021/8/4
|
||||
|
||||
@@ -14,7 +14,6 @@ nonebot.load_plugins("plugins/shop")
|
||||
nonebot.load_plugins("plugins/genshin")
|
||||
nonebot.load_plugins("plugins/alapi")
|
||||
nonebot.load_plugins("plugins/pix_gallery")
|
||||
nonebot.load_plugins("plugins/admin_bot_manage")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
+1
-4
@@ -115,10 +115,7 @@ AUTO_UPDATE_ZHENXUN: bool = True
|
||||
|
||||
# 群管理员功能 与 对应权限
|
||||
admin_plugins_auth = {
|
||||
"custom_welcome_message": OC_LEVEL,
|
||||
"group_notification_state": OC_LEVEL,
|
||||
"switch_rule": OC_LEVEL,
|
||||
"update_group_member_info": OC_LEVEL,
|
||||
"admin_bot_manage": OC_LEVEL,
|
||||
"ban": BAN_LEVEL,
|
||||
"delete_img": DELETE_IMG_LEVEL,
|
||||
"move_img": MOVE_IMG_LEVEL,
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
from nonebot.plugin import export
|
||||
from .data_source import update_member_info
|
||||
from .custom_welcome_message import *
|
||||
from .group_notification_state import *
|
||||
from .switch_rule import *
|
||||
from .update_group_member_info import *
|
||||
from .timing_task import *
|
||||
|
||||
|
||||
export = export()
|
||||
export.update_member_info = update_member_info
|
||||
@@ -1,6 +1,6 @@
|
||||
from nonebot import on_command, export
|
||||
from nonebot import on_command
|
||||
from nonebot.typing import T_State
|
||||
from nonebot.adapters.cqhttp import Bot, GroupMessageEvent, GROUP
|
||||
from nonebot.adapters.cqhttp import Bot, GroupMessageEvent
|
||||
from .data_source import update_member_info
|
||||
|
||||
__plugin_name__ = "更新群组成员列表"
|
||||
@@ -12,8 +12,7 @@ __plugin_usage__ = """
|
||||
更新群组成员列表
|
||||
"""
|
||||
|
||||
export = export()
|
||||
export.update_member_info = update_member_info
|
||||
from nonebot.adapters.cqhttp.permission import GROUP
|
||||
|
||||
refresh_member_group = on_command(
|
||||
"更新群组成员列表", aliases={"更新群组成员信息"}, permission=GROUP, priority=5, block=True
|
||||
|
||||
@@ -77,10 +77,10 @@ async def _(bot: Bot, event: MessageEvent, state: T_State):
|
||||
msg = get_message_text(event.json())
|
||||
if not msg or str(event.get_message()[:2]) in ["开启", "关闭"]:
|
||||
return
|
||||
if not _flmt.check(event.user_id):
|
||||
return
|
||||
_flmt.start_cd(event.user_id)
|
||||
await pa.finish(image(random.choice(os.listdir(IMAGE_PATH + "pa")), "pa"))
|
||||
if not _flmt.check(event.user_id):
|
||||
return
|
||||
_flmt.start_cd(event.user_id)
|
||||
await pa.finish(image(random.choice(os.listdir(IMAGE_PATH + "pa")), "pa"))
|
||||
|
||||
|
||||
num_key = {
|
||||
|
||||
@@ -158,7 +158,7 @@ async def update_setu_img():
|
||||
error_info = ['无报错..'] if not error_info else error_info
|
||||
await get_bot().send_private_msg(
|
||||
user_id=int(list(get_bot().config.superusers)[0]),
|
||||
message=f'{str(datetime.now()).split(".")[0]} 更新 色图 完成,本地存在 {count} 张,实际更新 {_success} 张,以下为更新时未知错误:\n'
|
||||
message=f'{str(datetime.now()).split(".")[0]} 更新 色图 完成,本地群在 {count} 张,实际更新 {_success} 张,以下为更新时未知错误:\n'
|
||||
+ "\n".join(error_info),
|
||||
)
|
||||
|
||||
|
||||
@@ -25,17 +25,16 @@ async def get_yiqing_data(area: str):
|
||||
if area == '中国':
|
||||
province = area
|
||||
province_type = ""
|
||||
elif area in data.keys() and area[-1] != '市':
|
||||
province = area if area[-1] != '省' else area[:-1]
|
||||
if len(data[province]) == 1:
|
||||
province_type = "市"
|
||||
city = ""
|
||||
else:
|
||||
area = area[:-1] if area[-1] == '市' else area
|
||||
elif area[-1] != '省':
|
||||
for p in data.keys():
|
||||
if area in data[p]:
|
||||
province = p
|
||||
city = area
|
||||
elif area in data.keys() or area[:-1] in data.keys():
|
||||
province = area if area[-1] != '省' else area[:-1]
|
||||
if len(data[province]) == 1:
|
||||
province_type = "市"
|
||||
city = ""
|
||||
if not province and not city:
|
||||
return "小真寻只支持国内的疫情查询喔..."
|
||||
async with aiohttp.ClientSession(headers=get_user_agent()) as session:
|
||||
|
||||
+3
-6
@@ -11,11 +11,8 @@
|
||||
"plugins/search_buff_skin_price",
|
||||
"plugins/super_help",
|
||||
"plugins/update_setu",
|
||||
"plugins/yiqing",
|
||||
"bot.py",
|
||||
"plugins/admin_bot_manage/update_group_member_info.py",
|
||||
"plugins/send_img"
|
||||
"plugins/yiqing"
|
||||
],
|
||||
"add_file": ["plugins/nbnhhsh.py", "plugins/roll.py"],
|
||||
"delete_file": [" plugins/admin_bot_manage/__init__.py"]
|
||||
}
|
||||
"delete_file": []
|
||||
}
|
||||
Reference in New Issue
Block a user