Fixing the flows command
This commit is contained in:
parent
4d4d3005d5
commit
524b5eed0b
@ -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,
|
||||
|
@ -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")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user