Compare commits
No commits in common. "master" and "ruler229-patch-5" have entirely different histories.
master
...
ruler229-p
18
main.py
18
main.py
@ -7,7 +7,6 @@ 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 (
|
||||||
@ -63,7 +62,7 @@ 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)) if i==0 else V.append(round(random.uniform(1, V[i-1]+1), 2))
|
V.append(round(random.uniform(0.01,100), 2)) if i==0 else V.append(round(random.uniform(1, V[i-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)"
|
||||||
@ -493,17 +492,4 @@ 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