diff --git a/CHANGELOG.md b/CHANGELOG.md index 38a60a9..43df85b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,22 +4,34 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] + +## [v2.0.0] - 2019-12-16 ### Added -- Global info, secrets, and options are now stored in their own files, using [0x5c/quick-bot-no-pain](https://github.com/0x5c/quick-bot-no-pain) -- Rich lookup for AE7Q (callsigns only, more to come) -- Rich lookup for QRZ, if a QRZ subscription is present -- Timestamp and requester username and avatar are now shown on embeds -- Current and 3-Day Forecast terrestrial weather conditions lookup commands -- Extension control commands. +- Rich lookup for AE7Q.com (callsigns only, more to come) +- Rich lookup for QRZ.com, if a QRZ subscription is present +- Current and 3-Day forecast for terrestrial weather conditions lookup commands - Changelog command +- Command to show callsign rules +- Extension control commands +- Timestamp and requester username and avatar are now shown on embeds +- Docker support, including an [official docker image](https://hub.docker.com/r/classabbyamp/discord-qrm2) and instructions for running the bot in docker +- Global info, secrets, and options are now stored in their own files, based on [0x5c/quick-bot-no-pain](https://github.com/0x5c/quick-bot-no-pain) ### Changed -- Rewrote code to take advantage of discord.py's cogs -- Moved most bot responses into embeds -- Re-implemented shutdown and restart commands using discord.py checks +- Improved the help command, taking advantage of discord.py's new features +- Improved command and argument names to be more clear - Embed colors now fit with discord's theme -- The contest calendar command no longer relies on `selenium` +- Re-implemented shutdown and restart commands using discord.py checks +- The contest calendar command no longer relies on `selenium` (more improvements to come) +- Rewrote code to take advantage of discord.py's cogs and extensions +- Moved most bot responses into embeds ### Removed -- CTY.DAT parsing is now its own library (`ctyparser` available on pypi) +- CTY.DAT parsing is now its own library ([`ctyparser` available on pypi](https://pypi.org/project/ctyparser/)) - Removed Herobrine ### Fixed - Cleaned up code to comply with the PEP8 Standard +- Issue in morse and unmorse commands where spaces were not interpreted correctly + +## v1.0.0 - 2019-07-31 [YANKED] + +[Unreleased]: https://github.com/classabbyamp/discord-qrm2/compare/v2.0.0...HEAD +[v2.0.0]: https://github.com/classabbyamp/discord-qrm2/releases/tag/v2.0.0 diff --git a/exts/base.py b/exts/base.py index 4adb6cb..4dd27e4 100644 --- a/exts/base.py +++ b/exts/base.py @@ -139,7 +139,7 @@ class BaseCog(commands.Cog): @commands.command(name="changelog", aliases=["clog"]) async def _changelog(self, ctx: commands.Context): - """Show what has changed in recent bot versions.""" + """Show what has changed in the most recent bot version.""" embed = discord.Embed(title="qrm Changelog", description=("For a full listing, visit [Github](https://" "github.com/classabbyamp/discord-qrm2/blob/master/CHANGELOG.md)."), @@ -153,12 +153,12 @@ class BaseCog(commands.Cog): for ver, log in changelog.items(): if ver.lower() != 'unreleased': if 'date' in log: - header = f'**{ver}** ({log["date"]})' + embed.description += f'\n\n**{ver}** ({log["date"]})' else: - header = f'**{ver}**' - embed.add_field(name=header, value=await format_changelog(log), inline=False) + embed.description += f'\n\n**{ver}**' + embed = await format_changelog(log, embed) vers += 1 - if vers >= 2: + if vers >= 1: break await ctx.send(embed=embed) @@ -175,26 +175,28 @@ def parse_changelog(): continue if re.match(r'##[^#]', line): ver_match = re.match(r'\[(.+)\](?: - )?(\d{4}-\d{2}-\d{2})?', line.lstrip('#').strip()) - ver = ver_match.group(1) - changelog[ver] = dict() - if ver_match.group(2): - changelog[ver]['date'] = ver_match.group(2) + if ver_match is not None: + ver = ver_match.group(1) + changelog[ver] = dict() + if ver_match.group(2): + changelog[ver]['date'] = ver_match.group(2) elif re.match(r'###[^#]', line): heading = line.lstrip('#').strip() changelog[ver][heading] = [] elif ver != '' and heading != '': - changelog[ver][heading].append(line.lstrip('-').strip()) + if line.startswith('-'): + changelog[ver][heading].append(line.lstrip('-').strip()) return changelog -async def format_changelog(log: dict): - formatted = '' +async def format_changelog(log: dict, embed: discord.Embed): for header, lines in log.items(): + formatted = '' if header != 'date': - formatted += f'**{header}**\n' for line in lines: formatted += f'- {line}\n' - return formatted + embed.add_field(name=f'**{header}**', value=formatted, inline=False) + return embed def setup(bot: commands.Bot): diff --git a/info.py b/info.py index 20a174d..4a51919 100644 --- a/info.py +++ b/info.py @@ -24,4 +24,4 @@ authors = ("@ClassAbbyAmplifier#2229", "@0x5c#0639") description = """A bot with various useful ham radio-related functions, written in Python.""" license = "Released under the GNU General Public License v2" contributing = "Check out the source on GitHub, contributions welcome: https://github.com/classabbyamp/discord-qrm2" -release = '1.0.0' +release = '2.0.0'