Fixing the flows command

This commit is contained in:
Luke Robles 2024-05-22 10:05:32 -07:00
parent 4d4d3005d5
commit 524b5eed0b
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")]