import inspect
import traceback

from curious import commands
from curious.commands.context import Context
from curious.commands.plugin import Plugin


def is_owner(self, ctx: Context):
    return ctx.author.id == 141545699442425856 or ctx.message.author.id == ctx.bot.application_info.owner.id


class Owner(Plugin):
    """
    Owner-only commands.
    """
    plugin_check = is_owner

    @commands.command(name="eval")
    async def _eval(self, ctx: Context, *, eval_str: str):
        """
        [Eval](https://docs.python.org/3.6/library/functions.html#eval)uates a command.
        """
        msg = await ctx.channel.send("Evaluating...")
        try:
            result = eval(eval_str)
            if inspect.isawaitable(result):
                result = await result

            result = str(result)
        except Exception as e:
            tb = ''.join(traceback.format_exc())
            result = tb

        fmtted = "```py\n{}\n```".format(result)
        await msg.edit(fmtted)

    @commands.command(name="load")
    async def _load(self, ctx: Context, *, import_name: str):
        """
        Loads a plugin.
        """
        await self.bot.load_plugins_from(import_name)
        await ctx.message.channel.send(":heavy_check_mark: Loaded.")

    @commands.command(name="unload")
    async def _unload(self, ctx: Context, *, import_name: str):
        """
        Unloads a plugin.
        """
        await self.bot.unload_plugins_from(import_name)
        await ctx.message.channel.send(":heavy_check_mark: Unloaded.")

@@ -26,16 +26,66 @@
 ceback%0A%0A
+import curio%0Afrom curio.traps import _get_kernel%0A%0A
 from cur
@@ -1581,16 +1581,270 @@
 rk: Unloaded.%22)%0A
+%0A    @commands.command(aliases=%5B%22harakiri%22%5D)%0A    async def seppeku(self, ctx: Context):%0A        %22%22%22%0A        Kills the bot, forcefully.%0A        %22%22%22%0A        import ctypes%0A        await ctx.channel.send(%22:skull_and_crossbones:%22)%0A        ctypes.string_at(1)%0A

Add kill command.