Added cooldowns to claim and unclaim
This commit is contained in:
parent
885c6f9309
commit
1317b7eaf3
@ -6,7 +6,8 @@ class BotManager:
|
|||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
|
|
||||||
@commands.command(name='claim', alaises=['makemine', 'gimme'])
|
@commands.command(name='claim', aliases=['makemine', 'gimme'])
|
||||||
|
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||||
async def _claim_bot(self, ctx, bot: discord.Member=None, prefix: str=None):
|
async def _claim_bot(self, ctx, bot: discord.Member=None, prefix: str=None):
|
||||||
if not bot.bot:
|
if not bot.bot:
|
||||||
raise RuntimeError('You can only claim bots.')
|
raise RuntimeError('You can only claim bots.')
|
||||||
@ -62,6 +63,7 @@ class BotManager:
|
|||||||
await ctx.send(embed=em)
|
await ctx.send(embed=em)
|
||||||
|
|
||||||
@commands.command(name='unclaim')
|
@commands.command(name='unclaim')
|
||||||
|
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||||
async def _unclaim_bot(self, ctx, bot: discord.Member=None):
|
async def _unclaim_bot(self, ctx, bot: discord.Member=None):
|
||||||
if not bot.bot:
|
if not bot.bot:
|
||||||
raise RuntimeError('You can only unclaim bots.')
|
raise RuntimeError('You can only unclaim bots.')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user