dec command + ratelimit for hex
This commit is contained in:
parent
9ca55a5461
commit
831e44d56b
1 changed files with 7 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue