From 118f7d22503fc8c2c9499103af6f1b430113221d Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Sat, 9 Mar 2024 09:16:30 -0500 Subject: markov: don't add space after forward slash --- markov/markov.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'markov/markov.py') diff --git a/markov/markov.py b/markov/markov.py index 3acf2dd..8081b07 100644 --- a/markov/markov.py +++ b/markov/markov.py @@ -404,7 +404,9 @@ class Markov(commands.Cog): next_token, frequency = row if random.randint(1, completion_count) <= frequency: - if next_token in PUNCTUATION: + if next_token == "/": + result = result[:-1] + next_token + elif next_token in PUNCTUATION: result = result[:-1] + next_token + " " else: result += next_token + " " -- cgit v1.2.3-57-g22cb