Skip to content

Commit

Permalink
fix: subscription autocomplete error on empty channel
Browse files Browse the repository at this point in the history
solumath authored and peterdragun committed Sep 1, 2024
1 parent 23946ff commit 5d4a4ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cogs/subscriptions/cog.py
Original file line number Diff line number Diff line change
@@ -16,6 +16,9 @@


async def autocomp_available_tags(inter: disnake.ApplicationCommandInteraction, user_input: str):
if "channel" not in inter.filled_options:
return []

channel_id = inter.filled_options["channel"]
channel: disnake.ForumChannel = await inter.bot.fetch_channel(channel_id)
return [tag.name for tag in channel.available_tags if user_input in tag.name][:25]

0 comments on commit 5d4a4ac

Please sign in to comment.