dev:style 项目结构和分类
This commit is contained in:
+3
-2
@@ -1,5 +1,7 @@
|
||||
import re
|
||||
from astrbot.api import logger
|
||||
|
||||
# 输入内容,获取过滤后的字符串与定时秒数
|
||||
class Pattern:
|
||||
_pattern = r'<wt>((?!wt).)*</wt>'
|
||||
|
||||
@@ -22,7 +24,7 @@ class Pattern:
|
||||
|
||||
def load(self,pattern_str:str)->int|None:
|
||||
content = pattern_str.strip().removeprefix("<wt>").removesuffix("</wt>").strip()
|
||||
print(content)
|
||||
|
||||
try:
|
||||
num = int(content)
|
||||
return self.sec_range(num)
|
||||
@@ -50,4 +52,3 @@ class Pattern:
|
||||
"content":o_str,
|
||||
"second":timerSec
|
||||
}
|
||||
print(Pattern("awdwadawd<wt>ada</wt>"))
|
||||
|
||||
Reference in New Issue
Block a user