Skip to content

Commit

Permalink
0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Oct 11, 2022
1 parent 376c99f commit 9079d0d
Show file tree
Hide file tree
Showing 229 changed files with 644 additions and 1,967 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ QQ交流:[122680593](https://jq.qq.com/?_wv=1027&k=lhxRkibY)

## 已有功能

- 聊天对话 (需要适配)
- 管理
- 签到
- 以图搜图
Expand All @@ -26,6 +27,9 @@ QQ交流:[122680593](https://jq.qq.com/?_wv=1027&k=lhxRkibY)
- rua图
- 日本语
- 文转图
- 查询干员信息
- AI作画 (需要适配)
- 猜干员游戏

## 下载

Expand Down
5 changes: 2 additions & 3 deletions app/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
from graia.scheduler.timers import every_hours
from arclet.alconna import Alconna, namespace
from arclet.alconna.tools.formatter import MarkdownTextFormatter
from arclet.alconna.graia.create import AlconnaBehaviorCreator
from arclet.alconna.graia import AlconnaBehaviour, AlconnaDispatcher, MatchPrefix
from graiax.playwright import PlaywrightService

Expand Down Expand Up @@ -97,7 +96,7 @@ def __init__(self, config: BotConfig, debug_log: bool = True):
self.saya = it(Saya)
it(AlconnaBehaviour)
scheduler = it(GraiaScheduler)
self.app.launch_manager.add_launchable(PlaywrightService("chromium"))
self.app.launch_manager.add_launchable(PlaywrightService("chromium", headless=True))
logger.success("------------------机器人初始化完毕--------------------")

@self.broadcast.finale_dispatchers.append
Expand Down Expand Up @@ -412,7 +411,7 @@ async def bot_invite(app: Ariadne, event: BotInvitedJoinGroupRequestEvent):
))
await event.accept('')
return await app.send_friend_message(event.supplicant, MessageChain(
f"{'该群已在黑名单中, 请告知管理员使用群管功能解除黑名单' if event.source_group in self.data.cache['blacklist'] else 'accepted.'}"
f"{'该群已在黑名单中, 请告知管理员使用群管功能解除黑名单' if event.source_group in self.data.cache.setdefault('blacklist', {}) else 'accepted.'}"
))
return await event.reject("请先加机器人好友")

Expand Down
2 changes: 1 addition & 1 deletion app/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def add_group(self, gid: int, **kwargs):
if k not in self.config.group_meta:
raise ValueError
self.__group_profiles[str(gid)] = GroupProfile(
id=gid, additional=kwargs, in_blacklist=(gid in self.__cache_data['blacklist']),
id=gid, additional=kwargs, in_blacklist=(gid in self.__cache_data.get('blacklist', {})),
disabled=list(self.disable_functions)
)

Expand Down
2 changes: 1 addition & 1 deletion assets/data/dialog_templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
".*结婚": [
"#image^cover$marry.png"
],
"档案": [
"你的档案": [
"#image$dashboard.png",
"#image$document.png"
]
Expand Down
Binary file added assets/image/guess.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions bot_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ plugin:
saucenao: 'xxxxxxxxxxxxxxxxxxxxxx'
## 卡池的文件路径
gacha: "assets/data/gacha_arknights.json"
## stable-diffusion-webui-api的接口地址
txt2img: "xxxxxxxxxxx"
## ai 对话
dialog:
## 触发词
Expand Down
1 change: 0 additions & 1 deletion modules/arknights/__init__.py

This file was deleted.

211 changes: 0 additions & 211 deletions modules/arknights/example_gacha.json

This file was deleted.

18 changes: 0 additions & 18 deletions modules/arknights/example_recruiment.json

This file was deleted.

Loading

0 comments on commit 9079d0d

Please sign in to comment.