fix(forums): fixed a typerror
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
4f9a1c9f4e
commit
a90fc5b878
1 changed files with 3 additions and 3 deletions
|
@ -96,17 +96,17 @@ class Forums(commands.Cog):
|
||||||
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
|
# Function to create select options
|
||||||
def create_select_options(self, data):
|
def create_select_options(self, ctx: commands.Context, data):
|
||||||
options = []
|
options = []
|
||||||
for tag in data:
|
for tag in data:
|
||||||
emoji = tag.emoji.id if tag.emoji.id else str(tag.emoji.name)
|
emoji = ctx.guild.get_emoji(tag.emoji.id) if tag.emoji.id else str(tag.emoji.name)
|
||||||
options.append(discord.SelectOption(label=tag.name, emoji=emoji, description=""))
|
options.append(discord.SelectOption(label=tag.name, emoji=emoji, description=""))
|
||||||
return options
|
return options
|
||||||
|
|
||||||
@forumsconfig.command()
|
@forumsconfig.command()
|
||||||
async def forumsconfig_tag_set(self, ctx, channel: discord.ForumChannel):
|
async def forumsconfig_tag_set(self, ctx, channel: discord.ForumChannel):
|
||||||
# Create select options from the proxy data
|
# Create select options from the proxy data
|
||||||
options = self.create_select_options(channel.available_tags)
|
options = self.create_select_options(ctx, channel.available_tags)
|
||||||
|
|
||||||
await ctx.send("Menus!", view=SelectView(options))
|
await ctx.send("Menus!", view=SelectView(options))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue