fix(forums): added a proper error message to resolvedset tag if the target channel is not a forums channel
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
0f08daa02d
commit
98243dcf69
1 changed files with 7 additions and 4 deletions
|
@ -179,8 +179,11 @@ class Forums(commands.Cog):
|
||||||
await ctx.send(f"{channel.mention} is not a forums channel!")
|
await ctx.send(f"{channel.mention} is not a forums channel!")
|
||||||
|
|
||||||
@resolvedset.command(name="tag")
|
@resolvedset.command(name="tag")
|
||||||
async def resolvedset_tag(self, ctx: commands.Context, channel: discord.ForumChannel):
|
async def resolvedset_tag(self, ctx: commands.Context, channel: discord.abc.GuildChannel):
|
||||||
"""Sets the tag used by the [p]resolved command."""
|
"""Sets the tag used by the [p]resolved command."""
|
||||||
|
if not isinstance(channel, discord.ForumChannel):
|
||||||
|
await ctx.send(f"{channel.mention} is not a forums channel!")
|
||||||
|
else:
|
||||||
options = self.create_select_options(ctx, channel.available_tags)
|
options = self.create_select_options(ctx, channel.available_tags)
|
||||||
msg = await ctx.send("Select a forum tag below.")
|
msg = await ctx.send("Select a forum tag below.")
|
||||||
await msg.edit(view=SelectView(msg, options))
|
await msg.edit(view=SelectView(msg, options))
|
||||||
|
|
Loading…
Reference in a new issue