Merge pull request #469 from miaowware/new-clt

exts/callsign: unworkaround some things solved in CLT 1.1.0
This commit is contained in:
0x5c 2023-01-29 00:34:04 -05:00 committed by GitHub
commit 56ae14a5c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
- Issue where embeds would not work for users without avatars (#467).
- Issue where embeds would show the wrong timezone.
- Several issues with `?call` caused by issues in a library (#466).
## [2.9.0] - 2023-01-13

View File

@ -12,7 +12,6 @@ from typing import Dict
import aiohttp
from callsignlookuptools import QrzAsyncClient, CallsignLookupError, CallsignData
from callsignlookuptools.common.dataclasses import Trustee
from discord.ext import commands
@ -74,7 +73,7 @@ class QRZCog(commands.Cog):
embed.title = f"QRZ Data for {data.callsign}"
embed.colour = cmn.colours.good
embed.url = data.url
if data.image is not None and data.image.url is not None:
if data.image is not None:
embed.set_thumbnail(url=data.image.url)
for title, val in qrz_process_info(data).items():
@ -101,9 +100,9 @@ def qrz_process_info(data: CallsignData) -> Dict:
qsl = dict()
if data.qsl is not None:
qsl = {
"eQSL?": data.qsl.eqsl.name.title(),
"Paper QSL?": data.qsl.mail.name.title(),
"LotW?": data.qsl.lotw.name.title(),
"eQSL?": data.qsl.eqsl,
"Paper QSL?": data.qsl,
"LotW?": data.qsl.lotw,
"QSL Info": data.qsl.info,
}
@ -120,7 +119,7 @@ def qrz_process_info(data: CallsignData) -> Dict:
"Aliases": ", ".join(data.aliases) if data.aliases else None,
"Previous Callsign": data.prev_call,
"License Class": data.lic_class,
"Trustee": data.trustee if data.trustee is not None and data.trustee != Trustee(None, None) else None,
"Trustee": data.trustee,
"Born": data.born,
} | qsl

View File

@ -2,7 +2,7 @@ py-cord~=2.3.2
aiohttp[speedups]
ctyparser~=2.0
gridtools~=1.0
callsignlookuptools[async]~=1.0
callsignlookuptools[async]~=1.1
beautifulsoup4
pytz
cairosvg