Compare commits

..
2 Commits
Author SHA1 Message Date
HibiKier 0b65ac2126 Update config.py 2021-08-10 23:12:43 +08:00
HibiKier 3611678e13 Update README.md 2021-08-10 23:04:58 +08:00
8 changed files with 27 additions and 26 deletions
+2 -4
View File
@@ -656,21 +656,19 @@ python bot.py
### 2021/8/10 ### 2021/8/10
* 重复的好友请求和邀群提示在5分钟内不会重复提示 * 重复的好友请求和邀群提示在5分钟内不会重复提示
* 疫情会优先检查城市,城市省份市区重名时请添加‘市’ * 疫情会优先检查城市,城市省份重名时请添加‘省’
* 添加命令‘原神资源查找’,‘设置cookie’ * 添加命令‘原神资源查找’,‘设置cookie’
* 添加配置AUTO_UPDATE_ZHENXUN,是否自动更新真寻,默认True * 添加配置AUTO_UPDATE_ZHENXUN,是否自动更新真寻,默认True
* 添加配置MAX_RUSSIAN_BET_GOLD,俄罗斯轮盘赌注最大金额,默认1000 * 添加配置MAX_RUSSIAN_BET_GOLD,俄罗斯轮盘赌注最大金额,默认1000
* 检查更新真寻定时任务时间改为12 : 00 * 检查更新真寻定时任务时间改为每日12 : 00
* 添加功能能不能好好说话(nbnhhsh) * 添加功能能不能好好说话(nbnhhsh)
* 添加功能随机roll,无参为数字,有参为随机参数 * 添加功能随机roll,无参为数字,有参为随机参数
* 添加linux重启脚本以及重启命令‘重启’(建议首次生成restart.sh先查看命令是否正确) * 添加linux重启脚本以及重启命令‘重启’(建议首次生成restart.sh先查看命令是否正确)
* 修复管理员功能的权限检测
### 2021/8/6 ### 2021/8/6
* 天气查询会优先遍历城市 * 天气查询会优先遍历城市
* 添加自动更新真寻命令 * 添加自动更新真寻命令
##### 如果你的版本为 2021/8/4,可以直接复制plugins/check_zhenxun_update后,通过指令来更新真寻 ##### 如果你的版本为 2021/8/4,可以直接复制plugins/check_zhenxun_update后,通过指令来更新真寻
### 2021/8/4 ### 2021/8/4
-1
View File
@@ -14,7 +14,6 @@ nonebot.load_plugins("plugins/shop")
nonebot.load_plugins("plugins/genshin") nonebot.load_plugins("plugins/genshin")
nonebot.load_plugins("plugins/alapi") nonebot.load_plugins("plugins/alapi")
nonebot.load_plugins("plugins/pix_gallery") nonebot.load_plugins("plugins/pix_gallery")
nonebot.load_plugins("plugins/admin_bot_manage")
if __name__ == "__main__": if __name__ == "__main__":
+1 -4
View File
@@ -115,10 +115,7 @@ AUTO_UPDATE_ZHENXUN: bool = True
# 群管理员功能 与 对应权限 # 群管理员功能 与 对应权限
admin_plugins_auth = { admin_plugins_auth = {
"custom_welcome_message": OC_LEVEL, "admin_bot_manage": OC_LEVEL,
"group_notification_state": OC_LEVEL,
"switch_rule": OC_LEVEL,
"update_group_member_info": OC_LEVEL,
"ban": BAN_LEVEL, "ban": BAN_LEVEL,
"delete_img": DELETE_IMG_LEVEL, "delete_img": DELETE_IMG_LEVEL,
"move_img": MOVE_IMG_LEVEL, "move_img": MOVE_IMG_LEVEL,
+11
View File
@@ -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.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 from .data_source import update_member_info
__plugin_name__ = "更新群组成员列表" __plugin_name__ = "更新群组成员列表"
@@ -12,8 +12,7 @@ __plugin_usage__ = """
更新群组成员列表 更新群组成员列表
""" """
export = export() from nonebot.adapters.cqhttp.permission import GROUP
export.update_member_info = update_member_info
refresh_member_group = on_command( refresh_member_group = on_command(
"更新群组成员列表", aliases={"更新群组成员信息"}, permission=GROUP, priority=5, block=True "更新群组成员列表", aliases={"更新群组成员信息"}, permission=GROUP, priority=5, block=True
+1 -1
View File
@@ -158,7 +158,7 @@ async def update_setu_img():
error_info = ['无报错..'] if not error_info else error_info error_info = ['无报错..'] if not error_info else error_info
await get_bot().send_private_msg( await get_bot().send_private_msg(
user_id=int(list(get_bot().config.superusers)[0]), 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), + "\n".join(error_info),
) )
+6 -7
View File
@@ -25,17 +25,16 @@ async def get_yiqing_data(area: str):
if area == '中国': if area == '中国':
province = area province = area
province_type = "" province_type = ""
elif area in data.keys() and area[-1] != '市': elif 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
for p in data.keys(): for p in data.keys():
if area in data[p]: if area in data[p]:
province = p province = p
city = area 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: if not province and not city:
return "小真寻只支持国内的疫情查询喔..." return "小真寻只支持国内的疫情查询喔..."
async with aiohttp.ClientSession(headers=get_user_agent()) as session: async with aiohttp.ClientSession(headers=get_user_agent()) as session:
+3 -5
View File
@@ -11,10 +11,8 @@
"plugins/search_buff_skin_price", "plugins/search_buff_skin_price",
"plugins/super_help", "plugins/super_help",
"plugins/update_setu", "plugins/update_setu",
"plugins/yiqing", "plugins/yiqing"
"bot.py",
"plugins/admin_bot_manage/update_group_member_info.py"
], ],
"add_file": ["plugins/nbnhhsh.py", "plugins/roll.py"], "add_file": ["plugins/nbnhhsh.py", "plugins/roll.py"],
"delete_file": [" plugins/admin_bot_manage/__init__.py"] "delete_file": []
} }