mirror of
https://github.com/miaowware/qrm2.git
synced 2025-06-01 22:22:25 -04:00
load changelog at cog load
This commit is contained in:
parent
a7578d5b8c
commit
7cd231b043
@ -19,6 +19,7 @@ class BaseCog(commands.Cog):
|
|||||||
def __init__(self, bot: commands.Bot):
|
def __init__(self, bot: commands.Bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
self.gs = bot.get_cog("GlobalSettings")
|
self.gs = bot.get_cog("GlobalSettings")
|
||||||
|
self.changelog = parse_changelog()
|
||||||
|
|
||||||
@commands.command(name="info", aliases=["about"])
|
@commands.command(name="info", aliases=["about"])
|
||||||
async def _info(self, ctx):
|
async def _info(self, ctx):
|
||||||
@ -55,7 +56,7 @@ class BaseCog(commands.Cog):
|
|||||||
timestamp=datetime.utcnow())
|
timestamp=datetime.utcnow())
|
||||||
embed.set_footer(text=ctx.author.name,
|
embed.set_footer(text=ctx.author.name,
|
||||||
icon_url=str(ctx.author.avatar_url))
|
icon_url=str(ctx.author.avatar_url))
|
||||||
changelog = await parse_changelog()
|
changelog = self.changelog
|
||||||
|
|
||||||
vers = 0
|
vers = 0
|
||||||
for ver, log in changelog.items():
|
for ver, log in changelog.items():
|
||||||
@ -72,7 +73,7 @@ class BaseCog(commands.Cog):
|
|||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
|
|
||||||
|
|
||||||
async def parse_changelog():
|
def parse_changelog():
|
||||||
changelog = OrderedDict()
|
changelog = OrderedDict()
|
||||||
ver = ''
|
ver = ''
|
||||||
heading = ''
|
heading = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user