Added icon_url to database caching

This commit is contained in:
Nemika
2021-03-08 16:31:55 +02:00
parent dcf1b306da
commit 07db6fdabf
2 changed files with 2 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ class Bumps(commands.Cog):
@commands.command() @commands.command()
async def bump(self, ctx): async def bump(self, ctx):
server = Servers(ctx.guild.id) server = Servers(ctx.guild.id)
server.update(icon_url=ctx.guild.icon_url_as(static_format="png"))
guild = ctx.guild guild = ctx.guild
prefix = Servers(guild.id).getPrefix() if Servers(guild.id).hasPrefix else self.config["prefix"] prefix = Servers(guild.id).getPrefix() if Servers(guild.id).hasPrefix else self.config["prefix"]

View File

@@ -99,7 +99,7 @@ class BumpSetup(commands.Cog):
webhook = await listing.create_webhook(name=self.config['bot_name']) 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.") await ctx.send("Setup complete! Server added to DB and the webhook was created.")