Compare commits
No commits in common. "85411ef5850602c4c286971f6326b182a1f9b16a" and "3e9b0c3834ff29376f6fb6a32f7f47437301c35d" have entirely different histories.
85411ef585
...
3e9b0c3834
1 changed files with 7 additions and 5 deletions
|
@ -95,6 +95,7 @@ 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:
|
||||||
|
@ -104,10 +105,11 @@ 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())
|
||||||
msg = await ctx.send(f"Forum tag is currently set to `{str(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))
|
||||||
|
|
||||||
class Select(ui.Select):
|
class Select(ui.Select):
|
||||||
|
|
Loading…
Reference in a new issue