From 96ced7982e7b373ddd050e2e76de58dbe060c0cd Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 7 Sep 2023 19:01:41 -0400 Subject: [PATCH] feat(forums): added forumconfig channel command --- forums/forums.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/forums/forums.py b/forums/forums.py index 2a23881..0a26413 100644 --- a/forums/forums.py +++ b/forums/forums.py @@ -105,13 +105,18 @@ class Forums(commands.Cog): options.append(discord.SelectOption(label=tag.name, emoji=emoji, description="", value=tag.id)) return options - @forumsconfig.command(name="tagset") + @forumsconfig.command(name="tag") async def forumsconfig_tag_set(self, ctx: commands.Context, channel: discord.ForumChannel): options = self.create_select_options(ctx, channel.available_tags) tag = channel.get_tag(await self.config.guild(ctx.guild).forum_tag()) msg = await ctx.send(f"Forum tag is currently set to `{str(tag)}`.") await msg.edit(view=SelectView(msg, options)) + @forumsconfig.command(name="channel") + async def forumsconfig_channel_set(self, ctx: commands.Context, channel: discord.ForumChannel): + await self.config.guild(ctx.guild).forum_channel.set(channel.id) + await ctx.send(f"Forum channel has been set to `{channel.name}`.") + class Select(ui.Select): def __init__(self, message, options): self.message = message