Compare commits

..
10 Commits
Author SHA1 Message Date
HibiKier c154c1d2a6 Update update_info.json 2021-08-11 12:40:02 +08:00
HibiKier 60da97790b Update README.md 2021-08-11 12:37:58 +08:00
HibiKier 1635637254 Update __init__.py 2021-08-11 12:35:05 +08:00
HibiKier 109b80b6ef Update data_source.py 2021-08-11 11:44:39 +08:00
hibiki 218147b771 fix rule 2021-08-11 11:16:58 +08:00
HibiKier eec810dc6a Update config.py 2021-08-11 11:09:02 +08:00
HibiKier c2e2dc5609 Update README.md 2021-08-11 11:06:53 +08:00
hibiki 8f46cffa44 fix rule 2021-08-11 11:06:17 +08:00
HibiKier db54df6ce5 Update README.md 2021-08-11 10:43:44 +08:00
hibiki e68b154ddc fix yiqing 2021-08-11 10:41:40 +08:00
9 changed files with 32 additions and 31 deletions
+5 -2
View File
@@ -656,19 +656,22 @@ 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
+1
View File
@@ -14,6 +14,7 @@ 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__":
+4 -1
View File
@@ -115,7 +115,10 @@ AUTO_UPDATE_ZHENXUN: bool = True
# 群管理员功能 与 对应权限
admin_plugins_auth = {
"admin_bot_manage": OC_LEVEL,
"custom_welcome_message": OC_LEVEL,
"group_notification_state": OC_LEVEL,
"switch_rule": OC_LEVEL,
"update_group_member_info": OC_LEVEL,
"ban": BAN_LEVEL,
"delete_img": DELETE_IMG_LEVEL,
"move_img": MOVE_IMG_LEVEL,
-11
View File
@@ -1,11 +0,0 @@
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
from nonebot import on_command, export
from nonebot.typing import T_State
from nonebot.adapters.cqhttp import Bot, GroupMessageEvent
from nonebot.adapters.cqhttp import Bot, GroupMessageEvent, GROUP
from .data_source import update_member_info
__plugin_name__ = "更新群组成员列表"
@@ -12,7 +12,8 @@ __plugin_usage__ = """
更新群组成员列表
"""
from nonebot.adapters.cqhttp.permission import GROUP
export = export()
export.update_member_info = update_member_info
refresh_member_group = on_command(
"更新群组成员列表", aliases={"更新群组成员信息"}, permission=GROUP, priority=5, block=True
+4 -4
View File
@@ -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 = {
+1 -1
View File
@@ -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),
)
+7 -6
View File
@@ -25,16 +25,17 @@ async def get_yiqing_data(area: str):
if area == '中国':
province = area
province_type = ""
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():
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
for p in data.keys():
if area in data[p]:
province = p
city = area
if not province and not city:
return "小真寻只支持国内的疫情查询喔..."
async with aiohttp.ClientSession(headers=get_user_agent()) as session:
+6 -3
View File
@@ -11,8 +11,11 @@
"plugins/search_buff_skin_price",
"plugins/super_help",
"plugins/update_setu",
"plugins/yiqing"
"plugins/yiqing",
"bot.py",
"plugins/admin_bot_manage/update_group_member_info.py",
"plugins/send_img"
],
"add_file": ["plugins/nbnhhsh.py", "plugins/roll.py"],
"delete_file": []
}
"delete_file": [" plugins/admin_bot_manage/__init__.py"]
}