From 07db6fdabf3df32618dd1f2ef6a5bb0921b72144 Mon Sep 17 00:00:00 2001 From: Nemika <33802693+Nemijus@users.noreply.github.com> Date: Mon, 8 Mar 2021 16:31:55 +0200 Subject: [PATCH] Added icon_url to database caching --- cogs/bump.py | 1 + cogs/setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cogs/bump.py b/cogs/bump.py index 57f0972..9929176 100644 --- a/cogs/bump.py +++ b/cogs/bump.py @@ -23,6 +23,7 @@ class Bumps(commands.Cog): @commands.command() async def bump(self, ctx): server = Servers(ctx.guild.id) + server.update(icon_url=ctx.guild.icon_url_as(static_format="png")) guild = ctx.guild prefix = Servers(guild.id).getPrefix() if Servers(guild.id).hasPrefix else self.config["prefix"] diff --git a/cogs/setup.py b/cogs/setup.py index 248ad46..bf7278c 100644 --- a/cogs/setup.py +++ b/cogs/setup.py @@ -99,7 +99,7 @@ class BumpSetup(commands.Cog): webhook = await listing.create_webhook(name=self.config['bot_name']) - Servers(ctx.guild.id).add(webhook=webhook.id, invite=invite.id, color=color, description=description) + Servers(ctx.guild.id).add(webhook=webhook.id, invite=invite.id, color=color, description=description, icon_url=ctx.guild.icon_url_as(static_format="png")) await ctx.send("Setup complete! Server added to DB and the webhook was created.")