From 831e44d56bfaeb64e9a51770a2ae880a42a2da5d Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Mon, 17 Jun 2019 19:17:13 +0300 Subject: [PATCH] dec command + ratelimit for hex --- cogs/basic.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cogs/basic.py b/cogs/basic.py index 1d5ee43..a2c6c3e 100644 --- a/cogs/basic.py +++ b/cogs/basic.py @@ -14,12 +14,19 @@ class Basic(Cog): """Says hello. Duh.""" await ctx.send(f"Hello {ctx.author.mention}!") + @commands.cooldown(1, 10, type=commands.BucketType.user) @commands.command(name="hex") async def _hex(self, ctx, num: int): """Converts base 10 to 16 (for emummc sector calculation)""" hex_val = hex(num).upper().replace("0X", "0x") await ctx.send(f"{ctx.author.mention}: {hex_val}") + @commands.cooldown(1, 10, type=commands.BucketType.user) + @commands.command(name="dec") + async def _dec(self, ctx, num): + """Converts base 10 to 16""" + await ctx.send(f"{ctx.author.mention}: {int(num)}") + @commands.guild_only() @commands.command() async def communitycount(self, ctx):