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]) msg_out.extend(["BIN" + card_bin])
try: try:
msg_out.extend(["卡品牌:" + bin_json['scheme']]) msg_out.extend(["卡品牌:" + bin_json['scheme']])
except KeyError: except (KeyError, TypeError):
pass pass
try: try:
msg_out.extend(["卡类型:" + bin_json['type']]) msg_out.extend(["卡类型:" + bin_json['type']])
except KeyError: except (KeyError, TypeError):
pass pass
try: try:
msg_out.extend(["卡种类:" + bin_json['brand']]) msg_out.extend(["卡种类:" + bin_json['brand']])
except KeyError: except (KeyError, TypeError):
pass pass
try: try:
msg_out.extend(["发卡行:" + bin_json['bank']["name"]]) msg_out.extend(["发卡行:" + bin_json['bank']["name"]])
except KeyError: except (KeyError, TypeError):
pass pass
try: try:
if bin_json['prepaid']: if bin_json['prepaid']:
msg_out.extend(["是否预付:是"]) msg_out.extend(["是否预付:是"])
else: else:
msg_out.extend(["是否预付:否"]) msg_out.extend(["是否预付:否"])
except KeyError: except (KeyError, TypeError):
pass pass
try: try:
msg_out.extend(["发卡国家:" + bin_json['country']['name']]) msg_out.extend(["发卡国家:" + bin_json['country']['name']])
except KeyError: except (KeyError, TypeError):
pass pass
await context.edit("\n".join(msg_out)) await context.edit("\n".join(msg_out))

View File

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