Skip to content

Commit 20f3591

Browse files
Merge pull request #4 from robertquitt/patch-1
Add range, list, tuple, etc. to available builtins
2 parents 2d92f5f + c315da4 commit 20f3591

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import discord
99
from discord.ext import commands
1010
import RestrictedPython
11-
from RestrictedPython import compile_restricted, utility_builtins
11+
from RestrictedPython import compile_restricted, limited_builtins, safe_builtins, utility_builtins
1212
from RestrictedPython.PrintCollector import PrintCollector
1313

1414
dotenv.load_dotenv()
@@ -24,6 +24,8 @@ def interpret(code):
2424
data = {
2525
"_print_": PrintCollector,
2626
"__builtins__": {
27+
**limited_builtins,
28+
**safe_builtins,
2729
**utility_builtins,
2830
"all": all,
2931
"any": any,

0 commit comments

Comments
 (0)