Compare commits
32 Commits
saipo_test
...
master
Author | SHA1 | Date | |
---|---|---|---|
d35fa08ae9 | |||
e730e4f07d | |||
71d3fef258 | |||
3b7154c43c | |||
3081e27492 | |||
d1018dcb6b | |||
7011750868 | |||
3de65377c8 | |||
0eaec7a561 | |||
![]() |
c604a07c81 | ||
893bce1805 | |||
![]() |
d1d6307dc0 | ||
68f98f2b20 | |||
![]() |
8997b1ebb3 | ||
feee265119 | |||
![]() |
8cce90d4b4 | ||
22c2029103 | |||
![]() |
8f21c75592 | ||
fa5f1f5ad0 | |||
![]() |
3bb631114f | ||
4a4f151e64 | |||
71ee4c7bf8 | |||
f1bc92f73f | |||
979eb197d6 | |||
9391193e27 | |||
35d1939d0b | |||
49e1bb15a9 | |||
0be461c61e | |||
f4f40cd4aa | |||
6ff728b21f | |||
f827007657 | |||
60ae392ae3 |
18
main.py
18
main.py
@ -7,6 +7,7 @@ from .back import time_long, volume, isUserExist, insertUser, seconds_to_hms, ml
|
|||||||
import pymysql
|
import pymysql
|
||||||
import matplotlib
|
import matplotlib
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
import os
|
||||||
from .Tool import get_tool_name
|
from .Tool import get_tool_name
|
||||||
import astrbot.api.message_components as Comp
|
import astrbot.api.message_components as Comp
|
||||||
from astrbot.core.utils.session_waiter import (
|
from astrbot.core.utils.session_waiter import (
|
||||||
@ -62,11 +63,11 @@ class MyPlugin(Star):
|
|||||||
time = [];V = [];a = [];b = []
|
time = [];V = [];a = [];b = []
|
||||||
for i in range(0,10):
|
for i in range(0,10):
|
||||||
time.append(round(random.uniform(1, 600), 2))
|
time.append(round(random.uniform(1, 600), 2))
|
||||||
V.append(round(random.uniform(0.01,100), 2))
|
V.append(round(random.uniform(0.01,100), 2)) if i==0 else V.append(round(random.uniform(1, V[i-1]+1), 2))
|
||||||
a.append(time_long(time[i]))
|
a.append(time_long(time[i]))
|
||||||
b.append(volume(V[i]))
|
b.append(volume(V[i]))
|
||||||
sql = "INSERT INTO dajiao (openid, timelong, volume) VALUES (%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s)"
|
sql = "INSERT INTO dajiao (openid, timelong, volume) VALUES (%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s),(%s, %s, %s)"
|
||||||
values = (user_name,time[0],V[0]),(user_name,time[1],V[1]),(user_name,time[2],V[2]),(user_name,time[3],V[3]),(user_name,time[4],V[4]),(user_name,time[5],V[5]),(user_name,time[6],V[6]),(user_name,time[7],V[7]),(user_name,time[8],V[8]),(user_name,time[9],V[9])
|
values = (user_name,time[0],V[0],user_name,time[1],V[1],user_name,time[2],V[2],user_name,time[3],V[3],user_name,time[4],V[4],user_name,time[5],V[5],user_name,time[6],V[6],user_name,time[7],V[7],user_name,time[8],V[8],user_name,time[9],V[9])
|
||||||
cur.execute(sql,values)
|
cur.execute(sql,values)
|
||||||
conn.commit()
|
conn.commit()
|
||||||
cur.close()
|
cur.close()
|
||||||
@ -493,3 +494,16 @@ class MyPlugin(Star):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"井字棋游戏错误: {str(e)}")
|
logger.error(f"井字棋游戏错误: {str(e)}")
|
||||||
yield event.plain_result("游戏发生错误,请稍后再试。")
|
yield event.plain_result("游戏发生错误,请稍后再试。")
|
||||||
|
|
||||||
|
@filter.command("帮我清理")
|
||||||
|
async def clean(self, event: AstrMessageEvent):
|
||||||
|
if isUserExist(event.get_sender_id()) != True:
|
||||||
|
insertUser(event.get_sender_id())
|
||||||
|
|
||||||
|
V = round(random.uniform(0.01,100), 2)
|
||||||
|
b = volume(V)
|
||||||
|
|
||||||
|
if V>=10:
|
||||||
|
yield event.plain_result(f"让我帮你好好清理一下哦~哧溜哧溜,嗯嗯,又射了{V}ml,{b}!")
|
||||||
|
else:
|
||||||
|
yield event.plain_result(f"让我帮你好好清理一下哦~哧溜哧溜,哎呀,全都清理干净啦,杂鱼杂鱼!")
|
Loading…
x
Reference in New Issue
Block a user