mirror of
https://github.com/miaowware/qrm2.git
synced 2024-11-26 09:48:41 -05:00
changelog command finished
This commit is contained in:
parent
12a7f9bbac
commit
94109b7a94
@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- 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
|
||||
- Changelog command
|
||||
### Changed
|
||||
- Rewrote code to take advantage of discord.py's cogs
|
||||
- Moved most bot responses into embeds
|
||||
|
@ -49,14 +49,24 @@ class BaseCog(commands.Cog):
|
||||
async def _changelog(self, ctx: commands.Context):
|
||||
"""Show what has changed in recent bot versions."""
|
||||
embed = discord.Embed(title="qrm Changelog",
|
||||
description="For a full listing, visit [Github](https://github.com/classabbyamp/discord-qrm-bot/blob/master/CHANGELOG.md).",
|
||||
colour=self.gs.colours.neutral,
|
||||
timestamp=datetime.utcnow())
|
||||
embed.set_footer(text=ctx.author.name,
|
||||
icon_url=str(ctx.author.avatar_url))
|
||||
changelog = await parse_changelog()
|
||||
|
||||
vers = 0
|
||||
for ver, log in changelog.items():
|
||||
embed.add_field(name=ver, value=await format_changelog(log), inline=False)
|
||||
if ver.lower() != 'unreleased':
|
||||
if 'date' in log:
|
||||
header = f'**{ver}** ({log["date"]})'
|
||||
else:
|
||||
header = f'**{ver}**'
|
||||
embed.add_field(name=header, value=await format_changelog(log), inline=False)
|
||||
vers += 1
|
||||
if vers >= 2:
|
||||
break
|
||||
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user