From 88b0783ecb8330174988f27bcca81b27068c640e Mon Sep 17 00:00:00 2001 From: Luke R Date: Wed, 22 May 2024 10:05:32 -0700 Subject: [PATCH] Fixing the flows command --- app/cogs/cheeky_functions.py | 6 ++++-- app/cogs/star_citizen.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/cogs/cheeky_functions.py b/app/cogs/cheeky_functions.py index 57a7c001..07cee8f7 100755 --- a/app/cogs/cheeky_functions.py +++ b/app/cogs/cheeky_functions.py @@ -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, diff --git a/app/cogs/star_citizen.py b/app/cogs/star_citizen.py index 446164f3..bd678974 100755 --- a/app/cogs/star_citizen.py +++ b/app/cogs/star_citizen.py @@ -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")]