Attempting to make recruitment channel behave

This commit is contained in:
AllfatherHatt 2025-05-18 13:12:25 +02:00
parent 7a9313d5a5
commit 1a390c3d25

View File

@ -115,10 +115,17 @@ class Recruitment(commands.Cog): # noqa
name="setapplicationschannel",
invoke_without_command=True,
)
async def set_applications_channel(self, ctx: commands.Context) -> None:
@commands.command(name="setapplicationschannel")
@checks.admin_or_permissions(manage_guild=True)
async def set_applications_channel(
self, ctx: commands.Context, channel: discord.TextChannel = None
) -> None:
"""Set the channel where applications will be sent."""
await self.config.guild(ctx.guild).application_channel_id.set(ctx.channel.id)
await ctx.send(f"Application channel set to {ctx.channel.mention}.")
# if no channel was passed, default to the one you ran it in
channel = channel or ctx.channel
await self.config.guild(ctx.guild).application_channel_id.set(channel.id)
await ctx.send(f"Application channel set to {channel.mention}.")
@set_applications_channel.command(name="clear")
async def clear_applications_channel(self, ctx: commands.Context) -> None: