Matchy matches matchees
Find a file
2024-08-13 14:17:36 +01:00
.github/workflows Reorganise a little to put scripts in bin 2024-08-11 18:04:21 +01:00
.vscode Move python files into py dir 2024-08-11 18:05:28 +01:00
bin Ensure bash scripts exit on fail and explain what they're doing 2024-08-11 18:07:20 +01:00
py Don't use setdefault when we're just getting information 2024-08-13 14:17:36 +01:00
.gitignore Rename history to state as it's now storing more than just the history 2024-08-11 12:16:23 +01:00
README.md Send a reminder message a day before a scheduled run 2024-08-12 23:29:40 +01:00
requirements.txt Add flake to the requirements.txt 2024-08-11 10:33:56 +01:00

Matchy

Matchy matches matchees.

Tests

Matchy is a Discord bot that groups up users for fun and vibes. Matchy can be installed on your server by clicking here.

Commands

Unless otherwise specified all commands are only usable in channels.

Usable by anyone

/join and /leave

Allows users to sign up and leave the group matching in the channel the command is used

/pause [days: int(7)]

Allows users to pause their matching in a channel for a given number of days. Users can use /join to re-join before the end of that time.

/list

List the current matchees in the channel as well as any current scheduled runes.

Usable by "matchers"

/match [group_min: int(3)]

Matches groups of users in a channel and offers a button to pose those groups to the channel to users with matcher auth scope. Tracks historical matches and attempts to match users to make new connections with people with divergent roles, in an attempt to maximise diversity.

/schedule [group_min: int(3)] [weekday: int(0)] [hour: int(9)] [cancel: bool(False)]

Allows a matcher to set a weekly schedule for matches in the channel, cancel can be used to remove a scheduled run

Usable by "owners"

$sync and $close

Reloads the config and syncs commands, or closes down the bot. Unlike all other commands these are usable in DMs with the bot user.

Dependencies

  • python3 - Obviously, ideally 3.11
  • venv - Used for the python virtual env, specs in requirements.txt

Config

Matchy is configured by a config.json file that takes this format:

{
    "version" : 1,
    "token" : "<<github bot token>>",

    "match" : {
        "score_factors": {
            "repeat_role" : 4,
            "repeat_match" : 8,
            "extra_member" : 32,
            "upper_threshold" : 64
        }
    }
}

Only token and version are required. See py/config.py for explanations for any of these.

TODO

  • Write integration tests (maybe with dpytest?)
  • Implement a .json file upgrade test
  • Track if meets were sucessful
  • Improve the weirdo