fix(forums): tag is now stored as an ID instead of a ForumTag object
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
Seaswimmer 2023-09-01 22:20:09 -04:00
parent 007fdac361
commit 546caca3e6
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -108,7 +108,7 @@ class Forums(commands.Cog):
# Create select options from the proxy data # 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 = config.guild(ctx.guild).forum_tag().name tag = channel.get_tag(await config.guild(ctx.guild).forum_tag())
msg = await ctx.send(f"Forum tag is currently set to `{tag}`.") msg = await ctx.send(f"Forum tag is currently set to `{tag}`.")
await msg.edit(view=SelectView(msg, options)) await msg.edit(view=SelectView(msg, options))
@ -121,7 +121,7 @@ class Select(ui.Select):
msg: discord.Message = self.message msg: discord.Message = self.message
await interaction.response.defer() await interaction.response.defer()
config = Config.get_conf(None, cog_name='Forums', identifier=2352711325) config = Config.get_conf(None, cog_name='Forums', identifier=2352711325)
config.guild(msg.guild).set.forum_tag(self.values[0]) config.guild(msg.guild).set.forum_tag(self.values[0].id)
await msg.edit(f"Set resolved tag to {self.values[0]}", view=None) await msg.edit(f"Set resolved tag to {self.values[0]}", view=None)
class SelectView(ui.View): class SelectView(ui.View):