This commit is contained in:
Zeva Rose 2021-06-27 19:03:23 -06:00
parent 74e7671909
commit 5e8701e1f3

View file

@ -4,6 +4,7 @@ import uuid
import re import re
import ulid import ulid
import base64 import base64
import subprocess
from discord.ext import commands from discord.ext import commands
from jarvis.utils import build_embed, convert_bytesize from jarvis.utils import build_embed, convert_bytesize
from jarvis.utils.field import Field from jarvis.utils.field import Field
@ -230,6 +231,11 @@ class DevCog(commands.Cog):
"`" + base64.b85decode(data.encode("UTF-8")).decode("UTF-8") + "`" "`" + base64.b85decode(data.encode("UTF-8")).decode("UTF-8") + "`"
) )
@commands.command(name="cloc", help="Get J.A.R.V.I.S. lines of code")
async def _cloc(self, ctx):
output = subprocess.check_output(["cloc", "."]).decode("UTF-8")
await ctx.send(f"```\n{output}\n```")
def setup(bot): def setup(bot):
bot.add_cog(DevCog(bot)) bot.add_cog(DevCog(bot))