removed literal_eval; insufficient

This commit is contained in:
Elmon11 2020-12-02 23:53:33 +01:00 committed by GitHub
parent 8058d5639b
commit 30ad48d1ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,5 @@
import discord import discord
import events import events
import ast
from datetime import datetime from datetime import datetime
from discord.ext import commands from discord.ext import commands
@ -77,7 +76,7 @@ class Miscellaneous(commands.Cog):
async def debug(self, ctx, *, cmd): async def debug(self, ctx, *, cmd):
'Executes a line of code' 'Executes a line of code'
try: try:
result = ast.literal_eval(cmd) result = eval(cmd)
if asyncio.iscoroutine(result): if asyncio.iscoroutine(result):
result = await result result = await result
await ctx.send(f'''```py await ctx.send(f'''```py