npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sockmafia

v3.4.0

Published

Mafia plugin for sockbot

Downloads

18

Readme

Stories in Ready Dependency Status devDependency Status optionalDependency Status Build Status Coverage Status

#SockBot Mafia

Mafia plugin for SockBot version 3.1.1 or later.

Command Reference

Detailed instructions can be found here:

###Player Commands All player commands must be run in the thread the game is being played in, as they are a matter of public record.

  • join: Join a game. The game in question must be in the "Preparing" stage, not yet running or completed.
  • list-players: List the current living players in the game.
  • list-all-players: List all players in the current game, whether alive, dead, or moderator.
  • list-votes: List the current day's votes.
  • vote: Vote for a player to be executed. Takes one parameter: the name of the player to be executed.
  • for: Alternate form of vote. The two forms are identical unless the player in question is a doublevoter.
  • nolynch: Vote for the group to not lynch anyone this current day. If No-lynch wins a vote, no execution occurs and the day ends.
  • no-lynch: Identical to nolynch.
  • unvote: Rescind your current vote.
  • target: Target a player with your night action (if any).
  • chat: Create a private chat with a player (and game mods). (if enabled by game mods)

###Moderator commands

  • prepare: Start a new game in the current thread. The person who executes this command becomes the moderator for the new game. Takes one argument: a descriptor for the game.
  • start: Move the game from a preparation state to the running state, closing signups and allowing voting. Must be run in the game thread.
  • set: Set a voting property for a player. Takes two arguments: the target username, such as '@yamikuronue', and the propery, one of loved, hated, or doublevoter.
  • next-phase: Move to the next game phase. Transitions night to day, and day to night. Must be used in the game thread. Takes no argumetns.
  • new-day: Move to the start of the next day. Takes no arguments.
  • kill: Kill a player. Does not transition the day. Takes one argument: the target username.
  • end: Finish the game. This prevents further voting in the thread of a game that has concluded. Must be run in the game thread.
  • add: Add a thread or chat to the game. Syntax: !add thread 1234 to testMafia or !add chat 123 to testMafia. Also try !add this to testMafia from the thread or chat you wish to add.
  • list-night-actions: List all the actions being performed this night so you can resolve them and move to day. Does not resolve or move to day automatically.
  • set-option: Set a Game Option
  • send-rolecard: Send a rolecard to a player

##Installation

The preferred method of installation is via NPM; simply run this command within the SockBot installation folder:

npm install sockbot-mafia

Other methods of installation are possible e.g. cloning the git repository, but only installation via NPM is supported.

###Post Install Setup

If you installed via NPM skip this step as NPM has already installed all necessary dependencies. Otherwise you will need to run the following command in the folder where you installed SockBot Mafia:

npm install

##Configuration

ocumentation about configuration options for the bot! YAML example:

---
core:
  username: username
  password: password
  owner: owner
plugins:
  sockbot-mafia: {}

JSON example:

{
  "core": {
    "username": "username",
    "password": "password",
    "owner": "owner"
  },
  "plugins": {
    "sockbot-mafia": {}
  }
}

Note that these examples assume an NPM-based installation; other installation methods may require the path to Mafia.js (without file extension) be specified explicitly.

YAML example:

---
core:
  username: username
  password: password
  owner: owner
plugins:
  '../path/to/Mafia': {}
    -

JSON example:

{
  "core": {
    "username": "username",
    "password": "password",
    "owner": "owner"
  },
  "plugins": {
    "../path/to/Mafia": {}
  }
}