mirror of
https://github.com/miaowware/qrm2.git
synced 2025-02-03 09:44:07 -05:00
Merge branch 'master' into ae7q-bugfixes
This commit is contained in:
commit
238cdf1c72
15
CHANGELOG.md
15
CHANGELOG.md
@ -5,12 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
|
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
### Changed
|
||||||
|
- Changelog command to accept a version as argument.
|
||||||
|
- The qrz command can now link to a QRZ page instead of embedding the data with the `--link` flag.
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fixed ditto marks (") appearing in the ae7q call command.
|
- Fixed ditto marks (") appearing in the ae7q call command.
|
||||||
- Fixed issue where incorrect table was parsed in ae7q call command.
|
- Fixed issue where incorrect table was parsed in ae7q call command.
|
||||||
|
|
||||||
|
|
||||||
## [v2.1.0] - 2020-01-04
|
## [2.1.0] - 2020-01-04
|
||||||
### Added
|
### Added
|
||||||
- New NATO "phonetics" command.
|
- New NATO "phonetics" command.
|
||||||
- Flag emojis to commands with countries.
|
- Flag emojis to commands with countries.
|
||||||
@ -21,14 +24,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- Command linking to the issue tracker.
|
- Command linking to the issue tracker.
|
||||||
- New key in options.py: pika.
|
- New key in options.py: pika.
|
||||||
### Changed
|
### Changed
|
||||||
- The "phonetics" command is not called "funetics".
|
- The "phonetics" command is now called "funetics".
|
||||||
- All commands now respond in embeds.
|
- All commands now respond in embeds.
|
||||||
- Playing status can now change on a schedule or randomly from a list.
|
- Playing status can now change on a schedule or randomly from a list.
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fixed incorrect information in the `prefixes` command.
|
- Fixed incorrect information in the `prefixes` command.
|
||||||
|
|
||||||
|
|
||||||
## [v2.0.0] - 2019-12-16
|
## [2.0.0] - 2019-12-16
|
||||||
### Added
|
### Added
|
||||||
- Rich lookup for AE7Q.com (callsigns only, more to come)
|
- Rich lookup for AE7Q.com (callsigns only, more to come)
|
||||||
- Rich lookup for QRZ.com, if a QRZ subscription is present
|
- Rich lookup for QRZ.com, if a QRZ subscription is present
|
||||||
@ -55,9 +58,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- Issue in morse and unmorse commands where spaces were not interpreted correctly
|
- Issue in morse and unmorse commands where spaces were not interpreted correctly
|
||||||
|
|
||||||
|
|
||||||
## v1.0.0 - 2019-07-31 [YANKED]
|
## 1.0.0 - 2019-07-31 [YANKED]
|
||||||
|
|
||||||
|
|
||||||
[Unreleased]: https://github.com/classabbyamp/discord-qrm2/compare/v2.1.0...HEAD
|
[Unreleased]: https://github.com/classabbyamp/discord-qrm2/compare/v2.1.0...HEAD
|
||||||
[v2.1.0]: https://github.com/classabbyamp/discord-qrm2/releases/tag/v2.1.0
|
[2.1.0]: https://github.com/classabbyamp/discord-qrm2/releases/tag/v2.1.0
|
||||||
[v2.0.0]: https://github.com/classabbyamp/discord-qrm2/releases/tag/v2.0.0
|
[2.0.0]: https://github.com/classabbyamp/discord-qrm2/releases/tag/v2.0.0
|
||||||
|
39
exts/base.py
39
exts/base.py
@ -120,25 +120,38 @@ class BaseCog(commands.Cog):
|
|||||||
await ctx.send(content, embed=embed)
|
await ctx.send(content, embed=embed)
|
||||||
|
|
||||||
@commands.command(name="changelog", aliases=["clog"])
|
@commands.command(name="changelog", aliases=["clog"])
|
||||||
async def _changelog(self, ctx: commands.Context):
|
async def _changelog(self, ctx: commands.Context, version: str = 'latest'):
|
||||||
"""Show what has changed in the most recent bot version."""
|
"""Show what has changed in a bot version."""
|
||||||
embed = cmn.embed_factory(ctx)
|
embed = cmn.embed_factory(ctx)
|
||||||
embed.title = "qrm Changelog"
|
embed.title = "qrm Changelog"
|
||||||
embed.description = ("For a full listing, visit [Github](https://"
|
embed.description = ("For a full listing, visit [Github](https://"
|
||||||
"github.com/classabbyamp/discord-qrm2/blob/master/CHANGELOG.md).")
|
"github.com/classabbyamp/discord-qrm2/blob/master/CHANGELOG.md).")
|
||||||
changelog = self.changelog
|
changelog = self.changelog
|
||||||
|
vers = list(changelog.keys())
|
||||||
|
vers.remove("Unreleased")
|
||||||
|
|
||||||
vers = 0
|
version = version.lower()
|
||||||
for ver, log in changelog.items():
|
|
||||||
if ver.lower() != 'unreleased':
|
if version == 'latest':
|
||||||
if 'date' in log:
|
version = info.release
|
||||||
embed.description += f'\n\n**{ver}** ({log["date"]})'
|
if version == 'unreleased':
|
||||||
else:
|
version = 'Unreleased'
|
||||||
embed.description += f'\n\n**{ver}**'
|
|
||||||
embed = await format_changelog(log, embed)
|
try:
|
||||||
vers += 1
|
log = changelog[version]
|
||||||
if vers >= 1:
|
except KeyError:
|
||||||
break
|
embed.title += ": Version Not Found"
|
||||||
|
embed.description += '\n\n**Valid versions:** latest, '
|
||||||
|
embed.description += ', '.join(vers)
|
||||||
|
embed.colour = cmn.colours.bad
|
||||||
|
await ctx.send(embed=embed)
|
||||||
|
return
|
||||||
|
|
||||||
|
if 'date' in log:
|
||||||
|
embed.description += f'\n\n**v{version}** ({log["date"]})'
|
||||||
|
else:
|
||||||
|
embed.description += f'\n\n**v{version}**'
|
||||||
|
embed = await format_changelog(log, embed)
|
||||||
|
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ class HamCog(commands.Cog):
|
|||||||
embed.colour = cmn.colours.good
|
embed.colour = cmn.colours.good
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
|
|
||||||
@commands.command(name="prefixes", aliases=["vanity", "pfx", "vanities", "prefix"])
|
@commands.command(name="prefixes", aliases=["vanity", "pfx", "vanities", "prefix"], category=cmn.cat.ref)
|
||||||
async def _vanity_prefixes(self, ctx: commands.Context, country: str = None):
|
async def _vanity_prefixes(self, ctx: commands.Context, country: str = None):
|
||||||
'''Lists valid prefixes for countries.'''
|
'''Lists valid prefixes for countries.'''
|
||||||
if country is None:
|
if country is None:
|
||||||
|
@ -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…
Reference in New Issue
Block a user