Skip to content

Commit 32f9d27

Browse files
authored
Fix factoid all when there are no factoids for a given guild (#1322)
1 parent 979bd00 commit 32f9d27

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

techsupport_bot/commands/factoids.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,6 +1707,13 @@ async def app_command_all(
17071707
guild, exclusive_property=property, include_hidden=show_hidden
17081708
)
17091709

1710+
if not factoids:
1711+
embed = auxiliary.prepare_deny_embed(
1712+
"No factoids could be found matching your filter"
1713+
)
1714+
await interaction.response.send_message(embed=embed)
1715+
return
1716+
17101717
aliases = self.build_alias_dict_for_given_factoids(factoids)
17111718

17121719
# If the linx server isn't configured, we must make it a file

0 commit comments

Comments
 (0)