Skip to content
cards-against-humanity butlerbot plugin
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
config
db
migrations
models
test
.eslintrc.js
.gitignore
LICENSE
README.md
index.js
package.json
yarn.lock

README.md

Cards Against Humanity

This plugin allows you to play Cards Against Humanity over irc

Install

yarn add butlerbot-cards-against-humanity

Create a file in the plugin fir as follows

import cah from 'butlerbot-cards-against-humanity';
export default cah({
  production: {
    gameOptions: {
      setTopic: true,
      topicBase: '|| wiki: https://github.com/butlerx/butlerbot/wiki/Cards-Against-Humanity',
      notifyUsers: false,
      pointLimit: 5,
      idleLimit: 2,
      secondsBeforeStart: 60,
      roundMinutes: 6,
      database: false,
      maxPlayers: 8,
    },

    pluginOptions: {
      channels: ['#CardsAgainstHumanity'],
      channelsToExclude: ['#Uno', '#Countdown', '#bots', '#BookClub', 'helpdesk'],
      channelsToJoin: ['#CardsAgainstHumanity'],
    },
    db: {
      username: 'root',
      password: null,
      database: 'database_development',
      host: '127.0.0.1',
      port: 3306,
    },
  },
  development: {
    gameOptions: {
      setTopic: true,
      topicBase: '|| Dev Bot || Expect spam || Expect breakings',
      notifyUsers: false,
      pointLimit: 5,
      idleLimit: 2,
      secondsBeforeStart: 60,
      roundMinutes: 6,
      database: true,
      maxPlayers: 8,
    },

    pluginOptions: {
      channels: ['#botdev'],
      channelsToExclude: [],
      channelsToJoin: ['#botdev'],
    },
    db: {
      username: 'root',
      password: null,
      database: 'database_production',
      host: '127.0.0.1',
      port: 3306,
    },
  },
});

Commands

Public Commands

  • !start # - Start a new game. Optional parameter can by used to set a point limit for the game (e.g. !start 10 to play until one player has 10 points.)
  • !stop - Stop the currently running game.
  • !pause - Pause the currently running game.
  • !resume - Resume a paused game.
  • !join - Join to the currently running game.
  • !j - Alias for join command.
  • !quit - Quit from the game.
  • !q - alias for quit.
  • !cards - Show the cards you have in your hand.
  • !cah # (#) - Depending on the context this command will either play cards from your hand, or if you are the czar, will pick the winner at the end of a round
  • !points - Show players' awesome points in the current game.
  • !list - List players in the current game.
  • !players - Alias for !list command
  • !status - Show current status of the game. Output depends on the state of the game (e.g. when waiting for players to play, you can check who hasn't played yet)
  • !discard (#) - Discard cards once per round, at the cost of one awesome point. You can either provide no arugments to get an entirely new hand, or you can provide indices to only discard those cards. You must have at least one awesome point to discard cards.

Private Commands

  • !cah # (#) - Play a card from your hand

All of these commands are case insensitive and are trimmed for whitespace so "!start" and " !StaRt" will work the same

Configuration

In config/config.json there are three settings.

  • channels - Lists the channels this plugin can be used in. If you wish it to be usable in all channels the bot is in, set this to all.
  • channelsToExclude - Lists the channels the plugin cannot be used in if you have chosen that the plugin can be used in all channels but want to exclude one in particular
  • channelsToJoin - This is an array of channels the bot should join when this plugin is loaded.
You can’t perform that action at this time.