From cf46727258766c3c8f58233ce5cf76bce1d8124e Mon Sep 17 00:00:00 2001 From: Paillat Date: Mon, 21 Aug 2023 12:34:14 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(channelSetup.py):=20change?= =?UTF-8?q?=20guild=5Fid=20parameter=20type=20from=20int=20to=20str=20to?= =?UTF-8?q?=20handle=20cases=20where=20guild=5Fid=20is=20not=20an=20intege?= =?UTF-8?q?r=20=E2=9C=A8=20feat(channelSetup.py):=20convert=20guild=5Fid?= =?UTF-8?q?=20to=20string=20if=20it=20is=20not=20provided=20as=20a=20param?= =?UTF-8?q?eter=20to=20handle=20cases=20where=20guild=5Fid=20is=20not=20pa?= =?UTF-8?q?ssed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cogs/channelSetup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cogs/channelSetup.py b/src/cogs/channelSetup.py index d2d9d3f..9080694 100644 --- a/src/cogs/channelSetup.py +++ b/src/cogs/channelSetup.py @@ -233,8 +233,8 @@ 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_id: int = None, days: int = 180): - guild = Guild(guild_id or ctx.guild.id) + async def premium(self, ctx: discord.ApplicationContext, guild_id: str = None, days: int = 180): + guild = Guild(guild_id or str(ctx.guild.id)) guild.load() if await self.bot.is_owner(ctx.author): guild.premium = True