add hex command

This commit is contained in:
Ave Ozkal 2019-06-17 19:10:01 +03:00
parent edc7442532
commit 941270a586
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B

View file

@ -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):