We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 942bc24 commit e5f7117Copy full SHA for e5f7117
TagScriptEngine/block/randomblock.py
@@ -1,9 +1,10 @@
1
-import random
+from random import Random
2
from typing import Optional
3
4
from ..interface import verb_required_block
5
from ..interpreter import Context
6
7
+random = Random()
8
9
class RandomBlock(verb_required_block(True, payload=True)):
10
"""
@@ -43,4 +44,6 @@ def process(self, ctx: Context) -> Optional[str]:
43
44
spl = ctx.verb.payload.split(",")
45
random.seed(ctx.verb.parameter)
46
- return random.choice(spl)
47
+ choice = random.choice(spl)
48
+ random.seed()
49
+ return choice
0 commit comments