Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
afk-echo authored Jul 29, 2021
1 parent c3dc7be commit 9cd7fce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
from discord.ext import commands
from ConsoleToStr import ConsoleToStrConverter

command_prefix = "p." # change this to a prefix of your choice
# creates a Bot with command prefix p. - can be changed to whatever you like.
bot = commands.Bot(command_prefix="p.")
bot = commands.Bot(command_prefix=command_prefix)

# Actual bot code starts here.

Expand All @@ -23,7 +24,7 @@ async def run(ctx):
--enter code here--
```
'''
code_to_be_exec = ctx.message.content.lstrip("p.run").lstrip(" ```python").rstrip("```")
code_to_be_exec = ctx.message.content.lstrip(f"{command_prefix}run").lstrip(" ```python").rstrip("```")
code_to_be_exec.replace("os.remove","forbidden_command=")
conv.start()
exec(code_to_be_exec)
Expand Down

0 comments on commit 9cd7fce

Please sign in to comment.