mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-06-28 19:10:34 +12:00
add 10 second cooldown to pony commands
This commit is contained in:
parent
65bd30d1d5
commit
00adb2652d
11
pony/pony.py
11
pony/pony.py
|
@ -25,18 +25,22 @@ class Pony(commands.Cog):
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
|
@commands.cooldown(rate=1, per=10, type=commands.BucketType.user)
|
||||||
async def pony(self, ctx, *text):
|
async def pony(self, ctx, *text):
|
||||||
"""Retrieves the latest result from Derpibooru"""
|
"""Retrieves the latest result from Derpibooru"""
|
||||||
await self.fetch_image(ctx, randomize=False, tags=text)
|
await self.fetch_image(ctx, randomize=False, tags=text)
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
|
@commands.cooldown(rate=1, per=10, type=commands.BucketType.user)
|
||||||
async def ponyr(self, ctx, *text):
|
async def ponyr(self, ctx, *text):
|
||||||
"""Retrieves a random result from Derpibooru"""
|
"""Retrieves a random result from Derpibooru"""
|
||||||
await self.fetch_image(ctx, randomize=True, tags=text)
|
await self.fetch_image(ctx, randomize=True, tags=text)
|
||||||
|
|
||||||
# needed because derpi was having trouble getting a random image from our derpi page with the filters we have
|
# needed because derpi was having trouble getting a random image from our derpi page with the filters we have
|
||||||
@commands.command(pass_context=True)
|
@commands.command()
|
||||||
|
@commands.guild_only()
|
||||||
|
@commands.cooldown(rate=1, per=10, type=commands.BucketType.user)
|
||||||
async def mascot(self, ctx):
|
async def mascot(self, ctx):
|
||||||
"""
|
"""
|
||||||
Gives a random picture of our mascot!
|
Gives a random picture of our mascot!
|
||||||
|
@ -376,9 +380,6 @@ class Pony(commands.Cog):
|
||||||
return await message.edit(content=output)
|
return await message.edit(content=output)
|
||||||
|
|
||||||
async def red_delete_data_for_user(
|
async def red_delete_data_for_user(
|
||||||
self,
|
self, *, requester: Literal["discord_deleted_user", "owner", "user", "user_strict"], user_id: int,
|
||||||
*,
|
|
||||||
requester: Literal["discord_deleted_user", "owner", "user", "user_strict"],
|
|
||||||
user_id: int,
|
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue