diff options
| author | 2023-03-03 12:08:22 -0600 | |
|---|---|---|
| committer | 2023-03-03 12:08:22 -0600 | |
| commit | e38e090e9c0822c4e019273a979e434e4406ef6a (patch) | |
| tree | 882f1ebf82aa53a5cbd4544203802118c844cd42 /bot | |
| parent | Merge branch 'python-discord:main' into undeprecate-bookmark (diff) | |
| parent | fixed embed interaction and randomly choosing a kata (#1218) (diff) | |
Merge branch 'main' into undeprecate-bookmark
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]  |