Skip to content

Commit

Permalink
Merge branch 'nh-server:main' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
VannyBuns authored Mar 1, 2024
2 parents 7145e3d + 95a51be commit aa58ae2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
23 changes: 19 additions & 4 deletions cogs/assistance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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()
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -171,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"""
Expand Down
6 changes: 6 additions & 0 deletions cogs/memes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down

0 comments on commit aa58ae2

Please sign in to comment.