bc fix a bug

This commit is contained in:
xtaodada 2021-06-19 21:12:04 +08:00
parent 38fc0ba479
commit b8a4cb6571
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736
2 changed files with 6 additions and 2 deletions

6
bc.py
View File

@ -70,7 +70,11 @@ async def coin(context: Message) -> None:
return
else:
prices = binanceclient.get_all_tickers()
number = float(action[0])
try:
number = float(action[0])
except ValueError:
await context.edit('输入错误.\n-bc 数量 币种1 币种2')
return
_from = action[1].upper().strip()
_to = action[2].upper().strip()
front_text = ''

View File

@ -442,7 +442,7 @@
},
{
"name": "bc",
"version": "1.21",
"version": "1.22",
"section": "chat",
"maintainer": "Pentacene",
"size": "8.0 kb",