mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-01 01:30:04 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c154c1d2a6 | ||
|
|
60da97790b | ||
|
|
1635637254 | ||
|
|
109b80b6ef | ||
|
|
218147b771 | ||
|
|
eec810dc6a | ||
|
|
c2e2dc5609 | ||
|
|
8f46cffa44 | ||
|
|
db54df6ce5 | ||
|
|
e68b154ddc |
@@ -656,19 +656,22 @@ 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
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ 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__":
|
||||||
|
|||||||
+4
-1
@@ -115,7 +115,10 @@ AUTO_UPDATE_ZHENXUN: bool = True
|
|||||||
|
|
||||||
# 群管理员功能 与 对应权限
|
# 群管理员功能 与 对应权限
|
||||||
admin_plugins_auth = {
|
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,
|
"ban": BAN_LEVEL,
|
||||||
"delete_img": DELETE_IMG_LEVEL,
|
"delete_img": DELETE_IMG_LEVEL,
|
||||||
"move_img": MOVE_IMG_LEVEL,
|
"move_img": MOVE_IMG_LEVEL,
|
||||||
|
|||||||
@@ -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.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
|
from .data_source import update_member_info
|
||||||
|
|
||||||
__plugin_name__ = "更新群组成员列表"
|
__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(
|
refresh_member_group = on_command(
|
||||||
"更新群组成员列表", aliases={"更新群组成员信息"}, permission=GROUP, priority=5, block=True
|
"更新群组成员列表", 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())
|
msg = get_message_text(event.json())
|
||||||
if not msg or str(event.get_message()[:2]) in ["开启", "关闭"]:
|
if not msg or str(event.get_message()[:2]) in ["开启", "关闭"]:
|
||||||
return
|
return
|
||||||
if not _flmt.check(event.user_id):
|
if not _flmt.check(event.user_id):
|
||||||
return
|
return
|
||||||
_flmt.start_cd(event.user_id)
|
_flmt.start_cd(event.user_id)
|
||||||
await pa.finish(image(random.choice(os.listdir(IMAGE_PATH + "pa")), "pa"))
|
await pa.finish(image(random.choice(os.listdir(IMAGE_PATH + "pa")), "pa"))
|
||||||
|
|
||||||
|
|
||||||
num_key = {
|
num_key = {
|
||||||
|
|||||||
@@ -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),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -25,16 +25,17 @@ async def get_yiqing_data(area: str):
|
|||||||
if area == '中国':
|
if area == '中国':
|
||||||
province = area
|
province = area
|
||||||
province_type = ""
|
province_type = ""
|
||||||
elif area[-1] != '省':
|
elif area in data.keys() and 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]
|
province = area if area[-1] != '省' else area[:-1]
|
||||||
if len(data[province]) == 1:
|
if len(data[province]) == 1:
|
||||||
province_type = "市"
|
province_type = "市"
|
||||||
city = ""
|
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:
|
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:
|
||||||
|
|||||||
+6
-3
@@ -11,8 +11,11 @@
|
|||||||
"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",
|
||||||
|
"plugins/send_img"
|
||||||
],
|
],
|
||||||
"add_file": ["plugins/nbnhhsh.py", "plugins/roll.py"],
|
"add_file": ["plugins/nbnhhsh.py", "plugins/roll.py"],
|
||||||
"delete_file": []
|
"delete_file": [" plugins/admin_bot_manage/__init__.py"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user