From 2b2960ebde5254c6b91a0ee41796c07552917631 Mon Sep 17 00:00:00 2001 From: Yessiest Date: Mon, 23 Jan 2023 14:25:45 +0400 Subject: [PATCH] production code be like "nightly build from a week ago" --- plugins/tools/init.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/tools/init.lua b/plugins/tools/init.lua index 8061278..7392655 100644 --- a/plugins/tools/init.lua +++ b/plugins/tools/init.lua @@ -152,7 +152,14 @@ local markov = command("markov",{ return end markov_instance:load_state(preset) - local output = markov_instance:run(preset[1],100) + local first_word = "" + for k,v in pairs(preset) do + first_word = k + if math.random(1,10) == 5 then + break + end + end + local output = markov_instance:run(first_word,100) msg:reply(output) end })