This is an IRC bot using cinch, cinch-game-bot, and rebellion_g54 to allow play-by-IRC of "Coup: Guatemala 1954" or "Coup: Rebellion G54" by Rikki Tahta:
https://boardgamegeek.com/boardgame/148943
You'll need a recent version of Ruby. Ruby 2.1 or newer is required because of required keyword arguments. The build status will confirm compatibility with various Ruby versions. Note that 2.1 is in security maintenance mode, so it would be better to use a later version.
You'll need to install the required gems, which can be done automatically via bundle install
, or manually by reading the Gemfile
and using gem install
on each gem listed.
Given that you have performed the requisite setup, the minimal code to get a working bot might resemble:
require 'cinch'
require 'cinch/plugins/rebellion_g54'
bot = Cinch::Bot.new do
configure do |c|
c.nick = 'RebellionG54Bot'
c.server = 'irc.example.org'
c.channels = ['#playrebelliong54']
c.plugins.plugins = [Cinch::Plugins::RebellionG54]
c.plugins.options[Cinch::Plugins::RebellionG54] = {
channels: ['#playrebelliong54'],
settings: 'rebelliong54-settings.yaml',
}
end
end
bot.start