diff options
author | 2023-03-03 12:10:52 -0600 | |
---|---|---|
committer | 2023-03-03 12:10:52 -0600 | |
commit | 727b76273d0128c45dcddb5de994c9080822426e (patch) | |
tree | 08a6249721fb6de2ba47eac89a330d3df9dfbf4e /bot | |
parent | Merge main (diff) | |
parent | Merge branch 'main' into undeprecate-bookmark (diff) |
Merge
Diffstat (limited to 'bot')
-rw-r--r-- | bot/exts/utilities/challenges.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/bot/exts/utilities/challenges.py b/bot/exts/utilities/challenges.py index 54e57212..46bc0fae 100644 --- a/bot/exts/utilities/challenges.py +++ b/bot/exts/utilities/challenges.py @@ -84,6 +84,7 @@ class InformationDropdown(ui.Select): # The attribute is not set during initialization. result_embed = self.mapping_of_embeds[self.values[0]] await self.original_message.edit(embed=result_embed) + await interaction.response.defer() class Challenges(commands.Cog): @@ -122,12 +123,8 @@ class Challenges(commands.Cog): if not first_kata_div: raise commands.BadArgument("No katas could be found with the filters provided.") - elif len(first_kata_div) >= 3: - first_kata_div = choice(first_kata_div[:3]) - elif "q=" not in search_link: - first_kata_div = choice(first_kata_div) else: - first_kata_div = first_kata_div[0] + first_kata_div = choice(first_kata_div) # There are numerous divs before arriving at the id of the kata, which can be used for the link. first_kata_id = first_kata_div.a["href"].split("/")[-1] |