Fixing the flows command
All checks were successful
Build and push / changes (push) Successful in 5s
Build and push / Lint-Python (push) Successful in 6s
Build and push / Build-and-Push-Docker (push) Successful in 1m14s
Build and push / sync-argocd-app (push) Successful in 3s

This commit is contained in:
Luke R 2024-05-22 10:05:32 -07:00
parent 90ae182c8d
commit 88b0783ecb
2 changed files with 5 additions and 3 deletions

View File

@ -299,12 +299,14 @@ class Cheeky(commands.Cog):
await ctx.respond(":8ball: %s :8ball:" % result)
@commands.command(name="flows")
@commands.slash_command(
name="flows", description="Gets the river flow stats for 3 rivers"
)
async def flows(self, ctx: commands.Context):
import river_stats
result = river_stats.get_stats()
await ctx.reply(embed=result)
await ctx.respond(embed=result)
@commands.slash_command(
guild_ids=None,

View File

@ -76,7 +76,7 @@ class StarCitizen(commands.Cog):
returns a list of all ships in the game, which can then be passed to the /ship command for auto complete
"""
url = "https://starcitizen.tools/Category:Ships"
response = requests.get(url, timeout=5).text
response = requests.get(url, timeout=25).text
soup = BeautifulSoup(response, "html.parser")
h2_heading = soup.find("h2", text='Pages in category "Ships"')
return [link.text for link in h2_heading.find_next("div").find_all("a")]