diff --git a/CHANGELOG.md b/CHANGELOG.md index b38bda7..499f902 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Changed +- The qrz command can now link to a QRZ page instead of embedding the data with the `--link` flag. ## [v2.1.0] - 2020-01-04 diff --git a/exts/qrz.py b/exts/qrz.py index 6e8a86d..c2576c4 100644 --- a/exts/qrz.py +++ b/exts/qrz.py @@ -25,9 +25,11 @@ class QRZCog(commands.Cog): self._qrz_session_init.start() @commands.command(name="call", aliases=["qrz"], category=cmn.cat.lookup) - async def _qrz_lookup(self, ctx: commands.Context, callsign: str): - '''Look up a callsign on [QRZ.com](https://www.qrz.com/).''' - if keys.qrz_user == '' or keys.qrz_pass == '': + async def _qrz_lookup(self, ctx: commands.Context, callsign: str, *flags): + '''Look up a callsign on [QRZ.com](https://www.qrz.com/). Add `--link` to only link the QRZ page.''' + flags = [f.lower() for f in flags] + + if keys.qrz_user == '' or keys.qrz_pass == '' or '--link' in flags: await ctx.send(f'http://qrz.com/db/{callsign}') return