Skip to content

bencoronel/friendly-potato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meeny

A Slack bot for random team member selection with rotation mode support.

Features

  • Random Picking: Pick a random member from a channel or custom list
  • Rotation Mode: Sequential picking through an ordered list (everyone gets a turn)
  • Custom Lists: Create and manage lists of users for specific purposes
  • Statistics: Track pick history and fairness metrics (per channel)
  • Separate Rotation Stats: Rotation statistics are tracked separately from random picks
  • Shuffle: Randomize order of all members in a channel/list
  • Thread Support: Respond in threads using :thread: emoji
  • Reminders: Compatible with Slack's native /remind command
  • Fair Picking: Bias selection toward people who haven't been picked recently
  • Multiple Picks: Pick up to 3 people at once
  • User Exclusion: Exclude specific users on-the-fly
  • Slack Group Picking: Pick from Slack user groups (@groups)

Commands

Basic Commands

  • @Meeny pick - Pick random user from current channel
  • @Meeny pick <list-name> - Pick from a custom list
  • @Meeny create <list-name> - Create a new empty list
  • @Meeny create <list-name> with @user1 @user2 - Create list with users
  • @Meeny show <list-name> - Show all users in a list
  • @Meeny delete <list-name> - Delete a list
  • @Meeny add @user to <list-name> - Add user to list
  • @Meeny remove @user from <list-name> - Remove user from list
  • @Meeny shuffle - Shuffle all users in channel
  • @Meeny shuffle <list-name> - Shuffle users in a list
  • @Meeny stats - Show pick statistics for channel
  • @Meeny stats <list-name> - Show statistics for a list

Rotation Commands (Sequential Picking)

Rotation mode picks users in order, cycling through everyone before repeating. Each channel has its own rotation and stats, separate from random picks.

  • @Meeny rotation create @user1 @user2 @user3 ... - Create rotation with ordered users
  • @Meeny rotation next - Get next person in rotation
  • @Meeny rotation show - Show current rotation order and position
  • @Meeny rotation reset - Reset rotation back to first person
  • @Meeny rotation delete - Delete rotation for this channel
  • @Meeny rotation stats - Show rotation statistics (picks per user, cycles completed)
  • @Meeny rotations - List all rotations in current channel

Rotation Example:

@Meeny rotation create @alice @bob @charlie
# Creates rotation: Alice → Bob → Charlie → (back to Alice)

@Meeny rotation next
# Returns: Alice

@Meeny rotation next  
# Returns: Bob

@Meeny rotation next
# Returns: Charlie

@Meeny rotation next
# Returns: Alice (new cycle)

Advanced Commands

  • @Meeny pick 2 - Pick 2 random users from channel
  • @Meeny pick 3 from <list-name> - Pick 3 users from list
  • @Meeny pick from <list-name> excluding @user1 @user2 - Pick with exclusions
  • @Meeny pick @group-name - Pick from Slack user group

Installation

Download Pre-built Binaries

Pre-built binaries are available for Linux, macOS, and Windows from the Releases page.

Available platforms:

  • Linux (x64, ARM64, musl)
  • macOS (Intel, Apple Silicon)
  • Windows (x64)
  • Docker images (Linux AMD64/ARM64)

Quick install:

# Linux/macOS - Download latest release
curl -s https://api.github.com/repos/bencoronel/friendly-potato/releases/latest | \
  grep "browser_download_url.*$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/x64/').tar.gz" | \
  cut -d '"' -f 4 | \
  xargs curl -L | tar -xz

# Or download manually from GitHub Releases

Prerequisites

  • Rust 1.85+ (only for building from source)
  • SQLite

Setup

  1. Clone the repository:
git clone <repository-url>
cd meeny
  1. Create .env file:
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_SIGNING_SECRET=your-signing-secret
SLACK_APP_TOKEN=xapp-your-app-token
DATABASE_URL=sqlite://meeny.db
RUST_LOG=info
  1. Run migrations:
cargo run --bin migrate
  1. Start the bot:
cargo run

Development

Project Structure

src/
├── main.rs           # Application entry point
├── bot.rs            # Slack bot event handler
├── commands.rs       # Command parsing and routing
├── handlers/         # Command handlers
│   ├── pick.rs
│   ├── lists.rs
│   ├── shuffle.rs
│   └── stats.rs
├── models/           # Data models
│   ├── list.rs
│   ├── pick.rs
│   └── stats.rs
├── db.rs             # Database operations
└── config.rs         # Configuration

Running Tests

cargo test

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors