mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-06-02 10:34:54 +12:00
fixed bugged in markov
This commit is contained in:
parent
d26489adbd
commit
d065fb8224
|
@ -85,7 +85,7 @@ class Markov(commands.Cog):
|
||||||
|
|
||||||
if not starting_text:
|
if not starting_text:
|
||||||
markov_text = [random.choice(list(model.keys()))]
|
markov_text = [random.choice(list(model.keys()))]
|
||||||
elif not model[last_word]:
|
elif last_word in model and not model[last_word]:
|
||||||
markov_text = [last_word, random.choice(list(model.keys()))]
|
markov_text = [last_word, random.choice(list(model.keys()))]
|
||||||
else:
|
else:
|
||||||
markov_text = [last_word, random.choice(model[last_word])]
|
markov_text = [last_word, random.choice(model[last_word])]
|
||||||
|
|
Loading…
Reference in a new issue