Skip to content

Commit

Permalink
☃️ Testing some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
tookender committed Jun 1, 2024
1 parent 00e6aaa commit 554f8cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion extensions/config/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def __init__(self, bot: Korii):
self.bot = bot
self.description = "🔎 | For setting up Korii in your server."

group = commands.hybrid_group(name="config", description="Configure your guild's bot configuration.")
group: commands.HybridGroup = commands.hybrid_group(name="config", description="Configure your guild's bot configuration.")
18 changes: 9 additions & 9 deletions extensions/config/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ async def interaction_check(self, interaction: discord.Interaction) -> bool:


class LoggingConfig(ConfigBase):
@ConfigBase.group.command(aliases=["logging", "logger"])
@ConfigBase.group.group(aliases=["logging", "logger"])
@commands.max_concurrency(1, commands.BucketType.guild)
async def log(self, ctx: CustomContext):
"""Base command to manage the logging events.
Expand Down Expand Up @@ -661,7 +661,7 @@ async def log(self, ctx: CustomContext):
)
await ctx.send(embed=embed)

@ConfigBase.group.command(
@log.command(
name="enable",
aliases=["set-default"],
)
Expand Down Expand Up @@ -733,7 +733,7 @@ async def log_enable(self, ctx: CustomContext, channel: discord.TextChannel):
f"Successfully set the logging channel to {channel.mention}" f"\n_see `{ctx.clean_prefix}help log` for more customization commands!_"
)

@ConfigBase.group.command(name="disable", aliases=["disable-logging"])
@log.command(name="disable", aliases=["disable-logging"])
@commands.has_permissions(manage_guild=True)
@commands.max_concurrency(1, commands.BucketType.guild)
async def log_disable(self, ctx: CustomContext):
Expand Down Expand Up @@ -778,7 +778,7 @@ async def log_disable(self, ctx: CustomContext):
failed += 1
await ctx.send("✅ **Successfully unset all logging channels!**" f"\n_Deleted {success} webhooks. {failed} failed to delete._")

@ConfigBase.group.command(name="channels")
@log.command(name="channels")
@commands.has_permissions(manage_guild=True)
async def log_channels(self, ctx: CustomContext):
"""Shows this server's logging channels"""
Expand Down Expand Up @@ -812,7 +812,7 @@ async def log_channels(self, ctx: CustomContext):
embed.set_footer(text=f"{len(enabled)}/{len(set(loggings))} events enabled.")
await ctx.send(embed=embed)

@ConfigBase.group.command(name="disable-event", aliases=["disable_event", "de"])
@log.command(name="disable-event", aliases=["disable_event", "de"])
@commands.has_permissions(manage_guild=True)
@commands.max_concurrency(1, commands.BucketType.guild)
async def log_disable_event(self, ctx, *, event: ValidEventConverter):
Expand All @@ -835,7 +835,7 @@ async def log_disable_event(self, ctx, *, event: ValidEventConverter):
setattr(self.bot.guild_loggings[ctx.guild.id], event, False)
await ctx.send(f'✅ **|** Successfully disabled **{str(event).replace("_", " ").title()} Events**')

@ConfigBase.group.command(name="enable-event", aliases=["enable_event", "ee"])
@log.command(name="enable-event", aliases=["enable_event", "ee"])
@commands.has_permissions(manage_guild=True)
@commands.max_concurrency(1, commands.BucketType.guild)
async def log_enable_event(self, ctx: CustomContext, *, event: ValidEventConverter):
Expand All @@ -858,7 +858,7 @@ async def log_enable_event(self, ctx: CustomContext, *, event: ValidEventConvert
setattr(self.bot.guild_loggings[ctx.guild.id], event, True)
await ctx.send(f'✅ **|** Successfully enabled **{str(event).replace("_", " ").title()} Events**')

@ConfigBase.group.command(
@log.command(
name="edit-channels",
aliases=["edit_channels", "ec"],
)
Expand All @@ -873,7 +873,7 @@ async def log_edit_channels(self, ctx):
await view.wait()

@commands.max_concurrency(1, commands.BucketType.guild)
@ConfigBase.group.command(name="events", aliases=["all-events", "ae"])
@log.command(name="events", aliases=["all-events", "ae"])
@commands.has_permissions(manage_guild=True)
async def log_all_events(self, ctx: CustomContext):
if ctx.guild.id not in self.bot.log_channels:
Expand All @@ -884,7 +884,7 @@ async def log_all_events(self, ctx: CustomContext):
await view.start()
await view.wait()

@ConfigBase.group.command(name="auto-setup")
@log.command(name="auto-setup")
@commands.has_permissions(administrator=True)
@commands.max_concurrency(1, commands.BucketType.guild)
@commands.bot_has_guild_permissions(manage_channels=True, manage_webhooks=True)
Expand Down

0 comments on commit 554f8cf

Please sign in to comment.