Compare commits

...

49 Commits
check ... main

Author SHA1 Message Date
6de8b46cc8 F| 2023-12-31 09:14:42 +08:00
51011ec401 修改回复功能 2023-12-30 19:55:48 +08:00
6a3a31ab18 将部分消息添加回复功能 2023-12-30 19:55:25 +08:00
48867b8cf9 完善了一言功能:添加一言来源 2023-12-30 18:30:59 +08:00
70a01ec9f5 Merge branch 'main' of https://server1.xfcloud.org:20011/SharwOrange/icalingua-python-bot 2023-12-30 18:28:19 +08:00
49be7abc97 修改了requirement.txt 2023-12-30 18:28:09 +08:00
92e86ae7cc 删除 module/hitokoto/__pycache__/__init__.cpython-311.pyc 2023-12-30 10:26:28 +00:00
1ea0744062 修改了.gitignore 2023-12-30 18:26:04 +08:00
7c0016c4be 完善了一言功能 2023-12-30 18:23:22 +08:00
88260597b9 删除test.py 2023-12-30 17:43:26 +08:00
e035c8e93c 上传文件至 module/hitokoto 2023-12-30 09:39:00 +00:00
ec3962306e 上传文件至 / 2023-12-30 09:38:34 +00:00
a7c4686f66 Merge branch 'main' of https://server1.xfcloud.org:20011/SharwOrange/icalingua-python-bot 2023-12-30 15:34:07 +08:00
3e68e1b509 修改变量名 2023-12-30 15:30:41 +08:00
332657936f 删除 .vscode/settings.json
Signed-off-by: SharwOrange橙夜 <kuliangcha@qq.com>
2023-12-30 07:23:04 +00:00
196d3d8549 修改.gittignore 2023-12-30 15:19:27 +08:00
c138f0ac7e 添加半成品的一言 2023-12-30 15:16:50 +08:00
43dc6deaea 删掉了。vs 2023-12-28 22:10:34 +08:00
014116c105 修改了readme(again) 2023-12-28 22:10:00 +08:00
fc0b10815f 修改了readme 2023-12-28 22:08:28 +08:00
cebf394e23 将rtoml改为qtoml 2023-12-28 22:05:10 +08:00
1a5001312b 更新 readme.md
Signed-off-by: SharwOrange橙夜 <kuliangcha@qq.com>
2023-12-27 14:09:58 +00:00
4526284902 重新添加了README 2023-12-27 22:08:06 +08:00
47e4912c97 修改了一部分代码,支持了服务器人数查询 2023-12-27 22:06:57 +08:00
4d38da674e 上传文件至 /
Signed-off-by: SharwOrange橙夜 <kuliangcha@qq.com>
2023-12-26 10:42:25 +00:00
07d297173d 更新 readme.md
Signed-off-by: SharwOrange橙夜 <kuliangcha@qq.com>
2023-12-26 05:38:32 +00:00
dcdf91f445 更新 readme.md 2023-12-26 05:37:50 +00:00
a38a925e72 更新 readme.md
Signed-off-by: SharwOrange橙夜 <kuliangcha@qq.com>
2023-12-26 05:37:30 +00:00
018a5cd9ea 更新 readme.md
Signed-off-by: SharwOrange橙夜 <kuliangcha@qq.com>
2023-12-26 05:36:36 +00:00
daf53ba226
Update rust_socketio dependency and add patch for local development 2023-12-11 21:27:08 +08:00
27db3d5ef0
Refactor client.rs and main.rs 2023-12-11 18:17:55 +08:00
d1b27d3825
Update connect.py: Fix requireAuth function and modify jrrp logic 2023-12-11 18:17:41 +08:00
ec399233cc
Add IcalinguaSinger struct and client module 2023-12-11 01:17:25 +08:00
29c43e64e6
Add .gitignore and Cargo.toml files, and update connect.py and main.rs
Refactor authentication key handling in main.rs

Add event handler for any event

Fix authentication signature generation | 我tm直接就是一个感动中国

aaaaaa | key!
2023-12-11 01:03:19 +08:00
8dfbf1d7ab
byby safe eval 2023-10-15 12:33:01 +08:00
6200a18b82
rua 2023-10-15 01:25:50 +08:00
df616d8b53
记住了,谢谢 2023-10-15 01:23:07 +08:00
c1966e6f55
woops 2023-10-15 01:15:14 +08:00
88c46f754f
FXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXK 2023-10-15 01:14:00 +08:00
a2f5b30e75
add types 2023-10-07 00:22:28 +08:00
d5f289887f
just fxxx it up 2023-10-05 13:08:41 +08:00
78b24f0689
2023-10-04 16:44:08 +08:00
bc42df2472
F | 尝试在新线程里跑? 2023-10-04 16:35:35 +08:00
43a79b3f1c
F | 防止超时 2023-10-04 16:24:45 +08:00
8584c6c6fd
移除无用的部分 2023-10-04 12:36:52 +08:00
b6d58cf9fc
增加计时 2023-10-03 21:30:36 +08:00
e55c85a5ad
Add | readme and temp 2023-10-03 12:54:28 +08:00
0a8350e934
add license 2023-10-03 12:37:11 +08:00
a562ae4cef
demo
add requirement

re formated
2023-10-03 12:35:45 +08:00
4 changed files with 68 additions and 2 deletions

4
.gitignore vendored
View File

@ -2,4 +2,8 @@
config.toml config.toml
.vs .vs
.vscode .vscode
<<<<<<< HEAD
.idea .idea
=======
__pycache__
>>>>>>> 51011ec401ee07fe7446b24fad680a629e12ff56

View File

@ -3,6 +3,9 @@ import random
def hitokoto(ctypet): def hitokoto(ctypet):
result_type = None
try: try:
if ctypet == '动画' or ctypet == 'a': if ctypet == '动画' or ctypet == 'a':
@ -16,6 +19,7 @@ def hitokoto(ctypet):
elif ctypet == '原创' or ctypet == 'e': elif ctypet == '原创' or ctypet == 'e':
ctype = 'e' ctype = 'e'
elif ctypet == '网络' or ctypet == 'f': elif ctypet == '网络' or ctypet == 'f':
elif ctypet == '来自网络' or ctypet == 'f':
ctype = 'f' ctype = 'f'
elif ctypet == '其他' or ctypet == 'g': elif ctypet == '其他' or ctypet == 'g':
ctype = 'g' ctype = 'g'
@ -38,6 +42,12 @@ def hitokoto(ctypet):
return 0, hitokoto.json() return 0, hitokoto.json()
else: else:
return 3, None return 3, None
elif ctypet == None:
ctype = random.choice('abcdefghijkl')
elif ctypet == 'help':
return 1, None, result_type
else:
return 3, None, result_type
params_value = {'c': ctype} params_value = {'c': ctype}
hitokoto = requests.get('https://v1.hitokoto.cn', params=params_value) hitokoto = requests.get('https://v1.hitokoto.cn', params=params_value)
@ -47,6 +57,38 @@ def hitokoto(ctypet):
except IOError: except IOError:
return 2, None return 2, None
htype=hitokoto.json()['type']
if htype=='a':
result_type = '动画'
elif htype=='b':
result_type = '动漫'
elif htype=='c':
result_type = '游戏'
elif htype=='d':
result_type = '文学'
elif htype=='e':
result_type = '原创'
elif htype=='f':
result_type = '来自网络'
elif htype=='g':
result_type = '其他'
elif htype=='h':
result_type = '影视'
elif htype=='i':
result_type = '诗词'
elif htype=='j':
result_type = '网易云'
elif htype=='k':
result_type = '哲学'
elif htype=='l':
result_type = '抖机灵'
else:
result_type = '无法获取'
return 0, hitokoto.json(), result_type
except IOError:
return 2, None, result_type

View File

@ -0,0 +1,15 @@
import time
import random
import asyncio
import traceback
from typing import Dict, List, Tuple, Any, Optional, Union, Literal
import qtoml
import socketio
from colorama import Fore, Style
from nacl.signing import SigningKey
from lib_not_dr.types import Options
from mcstatus import JavaServer
def mcstatus():

View File

@ -3,4 +3,9 @@ colorama
qtoml qtoml
pynacl pynacl
python-socketio[asyncio_client] python-socketio[asyncio_client]
<<<<<<< HEAD
mcstatus mcstatus
=======
mcstatus
requests
>>>>>>> 51011ec401ee07fe7446b24fad680a629e12ff56