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
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
parent
007fdac361
commit
546caca3e6
1 changed files with 2 additions and 2 deletions
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue