bin fix a bug

This commit is contained in:
xtaodada 2021-10-31 22:56:18 +08:00
parent db275eacc3
commit 2c070164e3
No known key found for this signature in database
GPG Key ID: EE4DC37B55E24736
2 changed files with 7 additions and 7 deletions

12
bin.py
View File

@ -36,29 +36,29 @@ async def card(context):
msg_out.extend(["BIN" + card_bin])
try:
msg_out.extend(["卡品牌:" + bin_json['scheme']])
except KeyError:
except (KeyError, TypeError):
pass
try:
msg_out.extend(["卡类型:" + bin_json['type']])
except KeyError:
except (KeyError, TypeError):
pass
try:
msg_out.extend(["卡种类:" + bin_json['brand']])
except KeyError:
except (KeyError, TypeError):
pass
try:
msg_out.extend(["发卡行:" + bin_json['bank']["name"]])
except KeyError:
except (KeyError, TypeError):
pass
try:
if bin_json['prepaid']:
msg_out.extend(["是否预付:是"])
else:
msg_out.extend(["是否预付:否"])
except KeyError:
except (KeyError, TypeError):
pass
try:
msg_out.extend(["发卡国家:" + bin_json['country']['name']])
except KeyError:
except (KeyError, TypeError):
pass
await context.edit("\n".join(msg_out))

View File

@ -582,7 +582,7 @@
},
{
"name": "bin",
"version": "1.01",
"version": "1.02",
"section": "daily",
"maintainer": "paulkm",
"size": "1.8 kb",