mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-05-18 11:23:46 +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:
|
||||
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()))]
|
||||
else:
|
||||
markov_text = [last_word, random.choice(model[last_word])]
|
||||
|
|
Loading…
Reference in a new issue