mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-26 05:04:26 +00:00
eat 优化显示已有模版列表 (#199)
This commit is contained in:
parent
98da433945
commit
d12d4d8be9
10
eat.py
10
eat.py
@ -274,8 +274,13 @@ async def eat(context):
|
|||||||
return
|
return
|
||||||
txt = ""
|
txt = ""
|
||||||
if len(positions) > 0:
|
if len(positions) > 0:
|
||||||
|
noShowList = []
|
||||||
for key in positions:
|
for key in positions:
|
||||||
txt = f"{txt},{key}"
|
txt = f"{txt},{key}"
|
||||||
|
if len(positions[key]) > 2:
|
||||||
|
noShowList.append(positions[key][2])
|
||||||
|
for key in noShowList:
|
||||||
|
txt = txt.replace(f",{key}", "")
|
||||||
if txt != "":
|
if txt != "":
|
||||||
txt = txt[1:]
|
txt = txt[1:]
|
||||||
await context.edit(f"目前已有的模版列表如下:\n{txt}")
|
await context.edit(f"目前已有的模版列表如下:\n{txt}")
|
||||||
@ -296,6 +301,11 @@ async def eat(context):
|
|||||||
number = int(defaultConfig)
|
number = int(defaultConfig)
|
||||||
except:
|
except:
|
||||||
number = str(defaultConfig)
|
number = str(defaultConfig)
|
||||||
|
# 支持配置默认是倒立的头像
|
||||||
|
if number.startswith("."):
|
||||||
|
diu_round = True
|
||||||
|
number = number[1:]
|
||||||
|
|
||||||
except:
|
except:
|
||||||
number = randint(1, max_number)
|
number = randint(1, max_number)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user