1
0
Fork 0
mirror of synced 2024-05-20 20:42:27 +12:00

Remove vdebug command

This commit is contained in:
Phxntxm 2017-05-07 20:39:42 -05:00
parent 60b1510c5c
commit e282e1e073

View file

@ -235,35 +235,6 @@ class Music:
entry, _ = await state.songs.add_entry(song, requester)
return entry
@commands.command(pass_context=True)
@commands.check(utils.is_owner)
async def vdebug(self, ctx, *, code: str):
"""Evaluates code."""
code = code.strip('` ')
python = '```py\n{}\n```'
env = {
'bot': self.bot,
'ctx': ctx,
'message': ctx.message,
'server': ctx.message.guild,
'guild': ctx.message.guild,
'channel': ctx.message.channel,
'author': ctx.message.author
}
env.update(globals())
try:
result = eval(code, env)
if inspect.isawaitable(result):
result = await result
except Exception as e:
await ctx.send(python.format(type(e).__name__ + ': ' + str(e)))
return
await ctx.send(python.format(result))
@commands.command(pass_context=True)
@commands.guild_only()
@utils.custom_perms(send_messages=True)