Remove vdebug command
This commit is contained in:
parent
60b1510c5c
commit
e282e1e073
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue