markov: Add random replies
Forgot to implement this, oops Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -197,7 +197,9 @@ class Markov(Plugin):
|
||||
chosen = random.random()
|
||||
chain = self.get_chain(channel, who.nick)
|
||||
if chosen <= chain.reply_chance:
|
||||
pass
|
||||
message = chain.generate()
|
||||
if message:
|
||||
self.send_to(conn, channel, f"{who.nick}: {message}")
|
||||
|
||||
def get_chain(self, channel: str, who: str) -> Chain:
|
||||
if channel not in self.__chains:
|
||||
|
||||
Reference in New Issue
Block a user