Add cloc
This commit is contained in:
parent
74e7671909
commit
5e8701e1f3
1 changed files with 6 additions and 0 deletions
|
@ -4,6 +4,7 @@ import uuid
|
|||
import re
|
||||
import ulid
|
||||
import base64
|
||||
import subprocess
|
||||
from discord.ext import commands
|
||||
from jarvis.utils import build_embed, convert_bytesize
|
||||
from jarvis.utils.field import Field
|
||||
|
@ -230,6 +231,11 @@ class DevCog(commands.Cog):
|
|||
"`" + 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):
|
||||
bot.add_cog(DevCog(bot))
|
||||
|
|
Loading…
Add table
Reference in a new issue