From 941270a586f7990f1aeb9a71f466ef02a6d2f681 Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Mon, 17 Jun 2019 19:10:01 +0300 Subject: [PATCH] add hex command --- cogs/basic.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cogs/basic.py b/cogs/basic.py index c579743..50a681a 100644 --- a/cogs/basic.py +++ b/cogs/basic.py @@ -4,6 +4,7 @@ import discord from discord.ext import commands from discord.ext.commands import Cog + class Basic(Cog): def __init__(self, bot): self.bot = bot @@ -13,6 +14,11 @@ class Basic(Cog): """Says hello. Duh.""" await ctx.send(f"Hello {ctx.author.mention}!") + @commands.command(name="hex") + async def _hex(self, ctx, num: int): + """Converts base 10 to 16 (for emummc sector calculation)""" + await ctx.send(f"{ctx.author.mention}: {hex(num).upper()}") + @commands.guild_only() @commands.command() async def communitycount(self, ctx):