Skip to content

Instantly share code, notes, and snippets.

@SharaaEsper
Created February 7, 2017 05:04
Show Gist options
  • Save SharaaEsper/aabab44061f543cf99fafc597fc2d4e3 to your computer and use it in GitHub Desktop.
Save SharaaEsper/aabab44061f543cf99fafc597fc2d4e3 to your computer and use it in GitHub Desktop.
#Enable/Disable Markov Answers
command(:enable_markov) do |event|
game = Database::Game.owner(event.user.id)
next 'You aren\'t hosting any active games.' if game.nil?
next 'You can\'t modify your expanions after a game has been started!' if game.started
game.update markov: true
end
command(:disable_markov) do |event|
game = Database::Game.owner(event.user.id)
next 'You aren\'t hosting any active games.' if game.nil?
next 'You can\'t modify your expanions after a game has been started!' if game.started
game.update markov: false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment