From f3dd9b3db277f8b7914177f8127d2aaaefd17643 Mon Sep 17 00:00:00 2001 From: eip <36315290+eip618@users.noreply.github.com> Date: Thu, 29 Feb 2024 09:43:20 +1100 Subject: [PATCH 1/3] add soaps category and update accordingly untested, will revert if :b:roken --- cogs/assistance.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cogs/assistance.py b/cogs/assistance.py index 349b7d9c..cd6f3197 100644 --- a/cogs/assistance.py +++ b/cogs/assistance.py @@ -64,6 +64,7 @@ class Assistance(commands.GroupCog): def __init__(self, bot: Kurisu): self.bot: Kurisu = bot self.small_help_category: Optional[discord.CategoryChannel] = None + self.soaps_category: Optional[discord.CategoryChannel] = None self.bot.loop.create_task(self.setup_assistance()) self.filters = bot.filters @@ -75,6 +76,11 @@ async def setup_assistance(self): channel = self.bot.guild.get_channel(db_channel[0]) if channel and channel.type == discord.ChannelType.category: self.small_help_category = channel + db_channel2 = await self.bot.configuration.get_channel_by_name('soaps') + if db_channel2: + channel2 = self.bot.guild.get_channel(db_channel2[0]) + if channel2 and channel2.type == discord.ChannelType.category: + self.soaps_category = channel2 async def unisearch(self, query: str) -> list[dict]: query = query.lower() @@ -127,12 +133,12 @@ async def createsmallhelp(self, ctx: GuildContext, console: Literal['3ds', 'swit @commands.command(aliases=["soup", "soap"]) async def createsoap(self, ctx: GuildContext, helpee: discord.Member): """Creates a 🧼 help channel for a user. Helper+ only.""" - if not self.small_help_category: - return await ctx.send("The small help category is not set.") + if not self.soaps_category: + return await ctx.send("The soaps category is not set.") # Channel names can't be longer than 100 characters channel_name = f"3ds-{helpee.name}-soap-🧼"[:100] - channel = await self.small_help_category.create_text_channel(name=channel_name) - await asyncio.sleep(1) # Fix for discord race condition(?) + channel = await self.soaps_category.create_text_channel(name=channel_name) + await asyncio.sleep(3) # Fix for discord race condition(?) await channel.set_permissions(helpee, read_messages=True) await channel.send(f"{helpee.mention}, please read the following.\n" "0. If your console is on, turn it off. If your console happens to already be in GodMode9, skip to step 3.\n" From 66f632051b54d604cd2bcddf9324443f7ad1eac7 Mon Sep 17 00:00:00 2001 From: eip <36315290+eip618@users.noreply.github.com> Date: Thu, 29 Feb 2024 09:46:45 +1100 Subject: [PATCH 2/3] Update assistance.py --- cogs/assistance.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cogs/assistance.py b/cogs/assistance.py index cd6f3197..f603b891 100644 --- a/cogs/assistance.py +++ b/cogs/assistance.py @@ -177,6 +177,15 @@ async def setsmallhelp(self, ctx: GuildContext, category: discord.CategoryChanne self.small_help_category = category await ctx.send("Small help category set.") + @is_staff('OP') + @commands.guild_only() + @commands.command() + async def setsoaps(self, ctx: GuildContext, category: discord.CategoryChannel): + """Sets the soaps category for creating channels. OP+ only.""" + await self.bot.configuration.add_channel('soaps', category) + self.soaps_category = category + await ctx.send("Soaps category set.") + @commands.group(cooldown=None, invoke_without_command=True, case_insensitive=True) async def tutorial(self, ctx: KurisuContext): """Links to one of multiple guides""" From 95a51be6d929345508948a5702d81b9502209465 Mon Sep 17 00:00:00 2001 From: eip <36315290+eip618@users.noreply.github.com> Date: Thu, 29 Feb 2024 09:53:36 +1100 Subject: [PATCH 3/3] mandatory meme after actually making something work --- cogs/memes.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cogs/memes.py b/cogs/memes.py index 23dfab3f..d0aa923d 100644 --- a/cogs/memes.py +++ b/cogs/memes.py @@ -727,6 +727,12 @@ async def nogas2(self, ctx: KurisuContext): await self._meme(ctx, "", image_link="https://nintendohomebrew.com/assets/img/nhmemes/nobodycares.png") + @commands.command(hidden=True) + async def poggere(self, ctx: KurisuContext): + """poggers!""" + await self._meme(ctx, "", + image_link="https://upload.wikimedia.org/wikipedia/commons/d/dd/Le_poggere.jpg?20201109224437") + @commands.command(hidden=True, aliases=["🅱"]) async def b(self, ctx: KurisuContext): """haha, b emoji funny"""