tweaked carbon cooldown
This commit is contained in:
parent
28ccb8b10f
commit
08cc01ca70
1 changed files with 2 additions and 1 deletions
|
@ -9,7 +9,7 @@ class Carbon(commands.Cog):
|
||||||
self.client = client
|
self.client = client
|
||||||
|
|
||||||
@commands.group(name="carbon", usage="carbon [subcommand]", description="Can accumulate data about carbon levels in the UK")
|
@commands.group(name="carbon", usage="carbon [subcommand]", description="Can accumulate data about carbon levels in the UK")
|
||||||
@commands.cooldown(1, 30)
|
@commands.cooldown(1, 5)
|
||||||
async def carbon(self, ctx):
|
async def carbon(self, ctx):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ class Carbon(commands.Cog):
|
||||||
await ctx.send(embed=embed.make_embed_fields_footer("Carbon intensity in the UK", f"The carbon intensity for that date is considered **{data[3]}**.", f"{data[0]} | All values in gCO2/kWh", ("Measured", data[2]), ("Predicted", data[1])))
|
await ctx.send(embed=embed.make_embed_fields_footer("Carbon intensity in the UK", f"The carbon intensity for that date is considered **{data[3]}**.", f"{data[0]} | All values in gCO2/kWh", ("Measured", data[2]), ("Predicted", data[1])))
|
||||||
|
|
||||||
@carbon.command(name="during", usage="carbon during <Start> <Stop>", description="Creates a diagram about carbon levels in the given time period (YYYY-MM-DD)")
|
@carbon.command(name="during", usage="carbon during <Start> <Stop>", description="Creates a diagram about carbon levels in the given time period (YYYY-MM-DD)")
|
||||||
|
@commands.cooldown(1, 25)
|
||||||
async def during(self, ctx: discord.Client, start: str, stop: str):
|
async def during(self, ctx: discord.Client, start: str, stop: str):
|
||||||
path = carbon.level_from_to(start, stop)
|
path = carbon.level_from_to(start, stop)
|
||||||
if path == "":
|
if path == "":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue