eat 优化显示已有模版列表 (#199)

This commit is contained in:
lowking 2021-11-10 20:13:42 +08:00 committed by GitHub
parent 98da433945
commit d12d4d8be9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

10
eat.py
View File

@ -274,8 +274,13 @@ async def eat(context):
return
txt = ""
if len(positions) > 0:
noShowList = []
for key in positions:
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 != "":
txt = txt[1:]
await context.edit(f"目前已有的模版列表如下:\n{txt}")
@ -296,6 +301,11 @@ async def eat(context):
number = int(defaultConfig)
except:
number = str(defaultConfig)
# 支持配置默认是倒立的头像
if number.startswith("."):
diu_round = True
number = number[1:]
except:
number = randint(1, max_number)

View File

@ -202,7 +202,7 @@
},
{
"name": "eat",
"version": "1.034",
"version": "1.035",
"section": "profile",
"maintainer": "SF_PICK",
"size": "6.4 kb",