mirror of
https://github.com/miaowware/qrm2.git
synced 2025-07-30 20:02:26 -04:00
add --link flag to only link the qrz page (rather than embed)
This commit is contained in:
parent
c7d0a85464
commit
118d5e0b63
@ -25,9 +25,11 @@ class QRZCog(commands.Cog):
|
|||||||
self._qrz_session_init.start()
|
self._qrz_session_init.start()
|
||||||
|
|
||||||
@commands.command(name="call", aliases=["qrz"], category=cmn.cat.lookup)
|
@commands.command(name="call", aliases=["qrz"], category=cmn.cat.lookup)
|
||||||
async def _qrz_lookup(self, ctx: commands.Context, callsign: str):
|
async def _qrz_lookup(self, ctx: commands.Context, callsign: str, *flags):
|
||||||
'''Look up a callsign on [QRZ.com](https://www.qrz.com/).'''
|
'''Look up a callsign on [QRZ.com](https://www.qrz.com/). Add `--link` to only link the QRZ page.'''
|
||||||
if keys.qrz_user == '' or keys.qrz_pass == '':
|
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}')
|
await ctx.send(f'http://qrz.com/db/{callsign}')
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user