misc(forums): formatting changes

This commit is contained in:
Seaswimmer 2023-09-07 18:30:57 -04:00
parent 3e9b0c3834
commit 4fb42065b4
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -11,9 +11,9 @@ class Forums(commands.Cog):
self.bot = bot self.bot = bot
self.config = Config.get_conf(self, identifier=2352711325) self.config = Config.get_conf(self, identifier=2352711325)
self.config.register_guild( self.config.register_guild(
request_roles = [], request_roles=[],
forum_channel = "", forum_channel="",
forum_tag = "" forum_tag=""
) )
@commands.command() @commands.command()
@ -61,7 +61,7 @@ class Forums(commands.Cog):
if role_obj: if role_obj:
already_in_list.append(role_obj.mention) already_in_list.append(role_obj.mention)
if already_in_list: if already_in_list:
await ctx.send("Roles already in the request roles list:\n" + "\n".join(already_in_list), allowed_mentions = discord.AllowedMentions(roles=False)) await ctx.send("Roles already in the request roles list:\n" + "\n".join(already_in_list), allowed_mentions=discord.AllowedMentions(roles=False))
else: else:
await ctx.send("No roles are currently in the request roles list.") await ctx.send("No roles are currently in the request roles list.")
@ -95,7 +95,6 @@ class Forums(commands.Cog):
else: else:
await ctx.send("Please provide a valid role that exists in the request roles list.") await ctx.send("Please provide a valid role that exists in the request roles list.")
# Function to create select options
def create_select_options(self, ctx: commands.Context, data): def create_select_options(self, ctx: commands.Context, data):
options = [] options = []
for tag in data: for tag in data:
@ -105,7 +104,6 @@ class Forums(commands.Cog):
@forumsconfig.command(name="tagset") @forumsconfig.command(name="tagset")
async def forumsconfig_tag_set(self, ctx: commands.Context, channel: discord.ForumChannel): async def forumsconfig_tag_set(self, ctx: commands.Context, channel: discord.ForumChannel):
# Create select options from the proxy data
options = self.create_select_options(ctx, channel.available_tags) options = self.create_select_options(ctx, channel.available_tags)
config = Config.get_conf(None, cog_name='Forums', identifier=2352711325) config = Config.get_conf(None, cog_name='Forums', identifier=2352711325)
tag = channel.get_tag(await config.guild(ctx.guild).forum_tag()) tag = channel.get_tag(await config.guild(ctx.guild).forum_tag())