<commit_before># Perpetually Against Humanity, IRC Edition (pah-irc)

## What?

It's another IRC bot for playing [Cards Against Humanity](http://www.cardsagainsthumanity.com/).

## Why?

There's quite a few IRC bots for this already, but it struck me that none of
them particularly played to IRC's strengths, those being:

*   Asynchronous, long-term associations between a slowly evolving group

    IRC channels tend to exist for a long time with a group of people that
    alters quite slowly. Your typical real-life game of CAH involves a bunch of
    people at a specific event for a limited amount of time. An IRC channel may
    exist for years.

    So why can't you play CAH for years, but slowly?

    And why not have the players able to come and go? That's a disaster for an
    in-person limited-time game, but not a big deal for something that's
    essentially going to go on forever. The bot should know whose turn it is to
    do what, and remind them when it next sees them.

*   Opportunity for more natural interaction with a program

    IRC bots don't have to be incredibly terse using commands with tons of
    syntax.  It should be possible to conduct a simple game using simple
    English language expressions on the part of the players.

*   Multiple things happening at once

    No reason why the bot can't be running games in multiple channels at once.
    Running extra copies is going to be a bit tedious.

## Usage

Quite a few interactions with the bot will be fairly natural language and depend on context, for example:

> &lt;AgainstHumanity&gt; We need 3 more players to get this game started. Who
                          else wants to play? Say "AgainstHumanity: me" if
                          you'd like to join in.

> &lt;grifferz&gt; AgainstHumanity, me

> &lt;AgainstHumanity&gt; Great, you're in! 2 more players needed…

Which hopefully doesn't need to be documented.

### Public channel commands

Public channel commands should be addressed to the bot by just sending a
message to the channel with the bot's nickname as the first word. In the
documentation we'll assume that the bot's nickname is **AgainstHumanity**, so
for example:

> AgainstHumanity status

> AgainstHumanity: status

> AgainstHumanity, status

are all fine.

*   `status`

    Report the status of the game currently playing in the channel, if any.

    If a game is currently playing then this will say:

    *   Who we're waiting on (either to play their turn, or to pick the winner
        if they're the Card Tsar);

    *   Who the current Card Tsar is.

    *   The text of the current Black Card;

    *   Who's active in the game and what their scores are.

    *   The top three all-time points-scorers.

*   `start`

    Starts a new game of Perpetually Against Humanity. Players will need to be
    gathered before it will actually proceed.

*   `dealmein`

    `deal me in`

    Join in to the currently-active game. You'll immediately receive a hand and
    a reminder of the current Black Card by private message. You can play your
    hand immediately.

    If the game already has 20 players then you will need to wait until
    one of them resigns.

    If the game now has enough players to start then it will start.

*   `resign`

    `dealmeout`

    `deal me out`

    `retire`

    Resign from the currently-active game. Your scores will still be kept and
    you can join in to the game again later on. If this takes the number of
    active players below 4 then the game will be paused until someone joins
    again.

    Your hand of White Cards including any White Cards you already played are
    discarded.

    If you are the current round's Card Tsar then play will move on without any
    Awesome Points being awarded. If the hand was complete (all players made
    their play and plays were announced in the channel) then these White Cards
    will be discarded and new White Cards drawn. Otherwise played White Cards
    will be returned to players' hands.

*   `winner <number>`

    `<number>`

    Used by the Card Tsar to indicate that the play numbered <number> is the
    one they think is best.

    This command can be simply abbreviated as a single digit, as it will be
    obvious from the context what is meant.

### Private commands

These commands can be given in private message to the bot. Again there are some
interactions that are more natural, in response to the state of the game.

Many commands optionally take a channel parameter. This is only needed if the
player is in more than one active game. That's fairly unlikely so most of the
time that can be left off and the bot will work it out.

*   `[#channel] black`

    Repeat the text of the current Black Card.

*   `[#channel] hand`
    `[#channel] list`

    Provides a numbered list of the White Cards in the player's hand.

*   `[#channel] play <number>`

    `[#channel] play <number> <number>`

    `[#channel] play <number>,<number>`

    `[#channel] play <number> and <number>`

    `[#channel] play <number> & <number>`<commit_msg>Documentation for private status command.<commit_after># Perpetually Against Humanity, IRC Edition (pah-irc)

## What?

It's another IRC bot for playing [Cards Against Humanity](http://www.cardsagainsthumanity.com/).

## Why?

There's quite a few IRC bots for this already, but it struck me that none of
them particularly played to IRC's strengths, those being:

*   Asynchronous, long-term associations between a slowly evolving group

    IRC channels tend to exist for a long time with a group of people that
    alters quite slowly. Your typical real-life game of CAH involves a bunch of
    people at a specific event for a limited amount of time. An IRC channel may
    exist for years.

    So why can't you play CAH for years, but slowly?

    And why not have the players able to come and go? That's a disaster for an
    in-person limited-time game, but not a big deal for something that's
    essentially going to go on forever. The bot should know whose turn it is to
    do what, and remind them when it next sees them.

*   Opportunity for more natural interaction with a program

    IRC bots don't have to be incredibly terse using commands with tons of
    syntax.  It should be possible to conduct a simple game using simple
    English language expressions on the part of the players.

*   Multiple things happening at once

    No reason why the bot can't be running games in multiple channels at once.
    Running extra copies is going to be a bit tedious.

## Usage

Quite a few interactions with the bot will be fairly natural language and depend on context, for example:

> &lt;AgainstHumanity&gt; We need 3 more players to get this game started. Who
                          else wants to play? Say "AgainstHumanity: me" if
                          you'd like to join in.

> &lt;grifferz&gt; AgainstHumanity, me

> &lt;AgainstHumanity&gt; Great, you're in! 2 more players needed…

Which hopefully doesn't need to be documented.

### Public channel commands

Public channel commands should be addressed to the bot by just sending a
message to the channel with the bot's nickname as the first word. In the
documentation we'll assume that the bot's nickname is **AgainstHumanity**, so
for example:

> AgainstHumanity status

> AgainstHumanity: status

> AgainstHumanity, status

are all fine.

*   `status`

    Report the status of the game currently playing in the channel, if any.

    If a game is currently playing then this will say:

    *   Who we're waiting on (either to play their turn, or to pick the winner
        if they're the Card Tsar);

    *   Who the current Card Tsar is.

    *   The text of the current Black Card;

    *   Who's active in the game and what their scores are.

    *   The top three all-time points-scorers.

*   `start`

    Starts a new game of Perpetually Against Humanity. Players will need to be
    gathered before it will actually proceed.

*   `dealmein`

    `deal me in`

    Join in to the currently-active game. You'll immediately receive a hand and
    a reminder of the current Black Card by private message. You can play your
    hand immediately.

    If the game already has 20 players then you will need to wait until
    one of them resigns.

    If the game now has enough players to start then it will start.

*   `resign`

    `dealmeout`

    `deal me out`

    `retire`

    Resign from the currently-active game. Your scores will still be kept and
    you can join in to the game again later on. If this takes the number of
    active players below 4 then the game will be paused until someone joins
    again.

    Your hand of White Cards including any White Cards you already played are
    discarded.

    If you are the current round's Card Tsar then play will move on without any
    Awesome Points being awarded. If the hand was complete (all players made
    their play and plays were announced in the channel) then these White Cards
    will be discarded and new White Cards drawn. Otherwise played White Cards
    will be returned to players' hands.

*   `winner <number>`

    `<number>`

    Used by the Card Tsar to indicate that the play numbered <number> is the
    one they think is best.

    This command can be simply abbreviated as a single digit, as it will be
    obvious from the context what is meant.

### Private commands

These commands can be given in private message to the bot. Again there are some
interactions that are more natural, in response to the state of the game.

Many commands optionally take a channel parameter. This is only needed if the
player is in more than one active game. That's fairly unlikely so most of the
time that can be left off and the bot will work it out.

*   `[#channel] status`

    Identical to the public `status` command, but in private in case you don't
    want to bother the channel with the output.

*   `[#channel] black`

    Repeat the text of the current Black Card.

*   `[#channel] hand`
    `[#channel] list`

    Provides a numbered list of the White Cards in the player's hand.

*   `[#channel] play <number>`

    `[#channel] play <number> <number>`

    `[#channel] play <number>,<number>`

    `[#channel] play <number> and <number>`

    `[#channel] play <number> & <number>`
{'fraction_non_alphanumeric': 0.051973237661204305, 'fraction_numerical': 0.0009696499563657519, 'mean_word_length': 3.097735399284863, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1287317', 'n_tokens_mistral': 2894, 'n_tokens_neox': 2665, 'n_words': 1576}