fix(forums): hopefully fixed a bug in argument declarations
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
Seaswimmer 2023-09-01 22:15:42 -04:00
parent edbcc2f0e2
commit d36f42e8b9
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -109,7 +109,8 @@ class Forums(commands.Cog):
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() tag = config.guild(ctx.guild).forum_tag()
msg = await ctx.send(f"Forum tag is currently set to `{tag}`.", view=SelectView(msg, options)) msg = await ctx.send(f"Forum tag is currently set to `{tag}`.")
await msg.edit(view=SelectView(msg, options))
class Select(ui.Select): class Select(ui.Select):
def __init__(self, message, options): def __init__(self, message, options):
@ -124,6 +125,6 @@ class Select(ui.Select):
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):
def __init__(self, options, *, timeout=180): def __init__(self, msg, options, *, timeout=180):
super().__init__(timeout=timeout) super().__init__(timeout=timeout)
self.add_item(Select(options)) self.add_item(Select(msg, options))