summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ATRI/plugins/plugin_chat/__init__.py30
-rw-r--r--README.md6
-rw-r--r--changelog.md1
3 files changed, 20 insertions, 17 deletions
diff --git a/ATRI/plugins/plugin_chat/__init__.py b/ATRI/plugins/plugin_chat/__init__.py
index 13c6348..edd7dc7 100644
--- a/ATRI/plugins/plugin_chat/__init__.py
+++ b/ATRI/plugins/plugin_chat/__init__.py
@@ -32,7 +32,6 @@ from ATRI.utils.utils_history import saveMessage
from ATRI.utils.utils_request import request_api_text
from ATRI.utils.utils_rule import check_banlist, check_switch
-
CONFIG_PATH = Path('.') / 'config.yml'
config = load_yaml(CONFIG_PATH)['bot']
@@ -216,17 +215,17 @@ fxxkMe = on_command('口臭一下',
list_M = []
[email protected]() # type: ignore
async def _(bot: Bot, event: Event, state: dict) -> None:
user = str(event.user_id)
global list_M
- if countX(list_M, user) >= 3:
- await fxxkMe.finish("不是??你这么想被咱骂的嘛??被咱骂就这么舒服的吗?!该......你该不会是.....M吧!")
- list_M = list(set(list_M))
+ if countX(list_M, user) == 3:
+ await bot.send(event,
+ "不是??你这么想被咱骂的嘛??被咱骂就这么舒服的吗?!该......你该不会是.....M吧!")
- elif countX(list_M, user) >= 6:
- await fxxkMe.finish("给我适可而止阿!?")
+ elif countX(list_M, user) == 6:
+ await bot.send(event, "给我适可而止阿!?")
list_M = list(set(list_M))
else:
@@ -254,11 +253,11 @@ async def _(bot: Bot, event: Event, state: dict) -> None:
user = str(event.user_id)
global list_Y
- if countX(list_Y, user) >= 3:
- await hitokoto.finish("额......需要咱安慰一下嘛~?")
+ if countX(list_Y, user) == 3:
+ await bot.send(event, "额......需要咱安慰一下嘛~?")
- elif countX(list_Y, user) >= 6:
- await hitokoto.finish("如果心里感到难受就赶快去睡觉奥!别再憋自己了!")
+ elif countX(list_Y, user) == 6:
+ await bot.send(event, "如果心里感到难受就赶快去睡觉奥!别再憋自己了!")
list_Y = list(set(list_Y))
else:
@@ -350,12 +349,10 @@ async def _(bot: Bot, event: Event, state: dict) -> None:
num = randint(1, num)
bottle = data[str(num)]
- user = bottle[0]
- group = bottle[1]
msg = bottle[2]
msg0 = f'[CQ:at,qq={event.user_id}]\n'
- msg0 += f'漂流瓶[{num}]来自群[{group}][{user}],内容如下\n'
+ msg0 += f'漂流瓶[{num}]内容如下:\n'
msg0 += msg
await getDriftingBottle.finish(msg0)
@@ -417,9 +414,10 @@ async def _(bot: Bot, event: Event, state: dict) -> None:
global ban_temp_list
msg = str(event.message)
user = str(event.user_id)
-
+
# 检查是否满足条件
- if countX(ban_temp_list, user) == Textcheck().get_times(str(Textcheck().check(msg))):
+ if countX(ban_temp_list,
+ user) == Textcheck().get_times(str(Textcheck().check(msg))):
ban_temp_list = list(set(ban_temp_list))
ban(user)
diff --git a/README.md b/README.md
index c5cca21..89b1e8b 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+![](https://socialify.git.ci/Kyomotoi/ATRI/image?description=1&descriptionEditable=A%20project%20for%20ATRI%2C%20Usage%20go-CQHTTP%20%2B%20NoneBot2.&forks=1&issues=1&language=1&logo=https%3A%2F%2Fi.loli.net%2F2020%2F11%2F12%2FYcINCkyp8vK2inD.png&owner=1&pattern=Circuit%20Board&stargazers=1&theme=Light)
+
# ATRI——一个厨力项目
アトリは、高性能ですから!
@@ -15,6 +17,8 @@
此项目也作为我学习Python的一个很好的渠道,这里特别感谢 [Richard Chien](https://github.com/richardchien) 以及对此项目提供巨大帮助的 Python-SDK:[NoneBot](https://github.com/nonebot/nonebot)(目前已更换至 [NoneBot2](https://github.com/nonebot/nonebot2))
+目前计划使用 Golang 重构此项目 >>> [传送门](https://github.com/Kyomotoi/go-ATRI)
+
## 实现
アトリ可以在任何平台下运行
@@ -37,7 +41,7 @@
以及
-~~别催了别催了在安排了呜呜呜~~
+~~好!这波直接换头像,头像就是我本人就酱~~
## 特别感谢
[Richard Chien](https://github.com/richardchien): [CQHTTP](https://github.com/richardchien/coolq-http-api) 和 [NoneBot](https://github.com/nonebot/nonebot)
diff --git a/changelog.md b/changelog.md
new file mode 100644
index 0000000..fe5f01c
--- /dev/null
+++ b/changelog.md
@@ -0,0 +1 @@
+# ATRI 更新记录