From c236dfbb29d5461b4c4b43b59f2e1ad1ff2b3846 Mon Sep 17 00:00:00 2001 From: Paillat Date: Mon, 21 Aug 2023 12:32:10 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(channelSetup.py):=20fix=20pa?= =?UTF-8?q?rameter=20names=20in=20premium=20command=20to=20improve=20clari?= =?UTF-8?q?ty=20and=20consistency=20=E2=9C=A8=20feat(channelSetup.py):=20a?= =?UTF-8?q?dd=20optional=20parameters=20to=20premium=20command=20to=20allo?= =?UTF-8?q?w=20setting=20premium=20status=20and=20expiration=20date=20for?= =?UTF-8?q?=20a=20specific=20guild?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cogs/channelSetup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cogs/channelSetup.py b/src/cogs/channelSetup.py index d83d346..d2d9d3f 100644 --- a/src/cogs/channelSetup.py +++ b/src/cogs/channelSetup.py @@ -233,14 +233,14 @@ class ChannelSetup(commands.Cog): await ctx.respond(f"Set API key for {api} to `secret`.", ephemeral=True) @setup.command(name="premium", description="Set the guild to premium.") - async def premium(self, ctx: discord.ApplicationContext): - guild = Guild(ctx.guild.id) + async def premium(self, ctx: discord.ApplicationContext, guild_id: int = None, days: int = 180): + guild = Guild(guild_id or ctx.guild.id) guild.load() if await self.bot.is_owner(ctx.author): guild.premium = True # also set expiry date in 6 months isofromat guild.premium_expiration = datetime.datetime.now() + datetime.timedelta( - days=180 + days=days ) guild.updateDbData() return await ctx.respond("Set guild to premium.", ephemeral=True)