Giter VIP home page Giter VIP logo

slapchop's Introduction

SlapChop

Test Slapchop

A simple Discord bot for strategic rock-paper-scissors (or variants), for online roleplaying games following World of Darkness: Mind's Eye Theater (and similar) rulesets.

SlapChop permits players to secretly select their preferred chop. When all players in a challenge have made their selection, everyone's selections are revealed. Challenges can include mass challenges.

Adding SlapChop to your server:

To use the developer's hosted version, you can invite it your server with: https://discord.com/oauth2/authorize?client_id=1228038244550311969

Setting up your own seperate bot (technical users only)

If you are having difficulties because the developer is being lazy about keeping his hosted version up, you can create your own bot through the Discord Developer Portal and invite it to your server, then keep the Python script running to keep it responding.

If you're using a command-line Bash interface: once you have the bot's token, create a file called TOKEN (no extensions) containing only the token. Run run_slapchop.bat, which will create and run a new Slapchop python file containing your token.

Otherwise: copy slapchop.py somewhere you won't share it, paste the token into the TOKEN variable, and run.

Using SlapChop

Initial Setup

SlapChop does not offer any server-level settings. Just invite and go!

Help in Discord

@SlapChop#0552 help

In a DM:

help

This doesn't give more information than is in README.md, but includes basic usage and a link to this document. It also uses the correct @ names for the server you are in, if SlapChop's nickname has been changed.

Static Challenge

@SlapChop#0552 static

@Your Buddy SlapChop static

This makes a static challenge, as in the MET system. It has even odds of "Win", "Tie", or "Loss"; functionally, it's equivalent to playing RPS with a completely random opponent.

Contested Challenge

Issuing the challenge

@SlapChop#0552 challenge [@user 1]...[@user n]

@Your Buddy SlapChop challenge [@user 1]...[@user n]

You are automatically considered the aggressor, and anyone else a defender. So, for instance, if I wanted to challenge my friend "Wumpus", I might challenge:

@Your Buddy SlapChop challenge @Wumpus

When you send this message, everyone involved will receive a DM. If someone's DM settings block SlapChop from DMing them, they can DM SlapChop

hey

and it will let them know their challenge status.

Replying to a challenge

After this, each user in the challenge privately messages SlapChop with how they want to respond. SlapChop doesn't currently keep track of whether a response is a valid RPS option; it is the responsibility of players to respond appropriately. This lets SlapChop respect unusual RPS variants, like Rock-Paper-Scissors-Bomb or Rock-Paper-Scissors-Lizard-Spock.

For instance, I might DM:

rock

while Wumpus responds:

paper

SlapChop will then ask for a bid. The MET system is used for bid behavior. If everyone bids, and at least one player threw the same thing as the aggressor, the aggressor's bid is revealed, and so is whether anyone who tied bid more, less, or the same. The bid does need to be a whole number under 1,000,000. If you have over 1,000,000 traits in the MET system, something very silly has happened.

Once all challenged players have replied, SlapChop will send everyone a DM letting them know that the challenge is completed, then post the results in the channel where the challenge was issued.

slapchop's People

Contributors

luke-hdl avatar

Watchers

 avatar

slapchop's Issues

Update README.md verbiage... again.

It doesn't reflect improvements to the Challenge and Reply systems; also, its "upcoming changes" list should be updated to reflect that many of these changes have been made.

Improvements to Reply Syntax

Reply should treat multiple spaces in a row as a single space.

Reply should let players know that their reply is too long or contains spaces where it shouldn't.

Reply should let players declare their trait count.

Investigate permissions settings needed for sending DMs

I think I might have been mistaken about how privileged intents work. As I am trying to avoid privileged intents, I would like to further investigate if SlapChop can send DMs to individuals that have been mentioned to it, even if they have not mentioned it personally or DMed it.

Default challenge names.

Players might sometimes forget to include a challenge name. Since they're usually not too important, a challenge name could be picked randomly from a list, or maybe mash together the usernames of the players in the challenge.

Improved handling of Challenge Names

  • Player-provided challenge names should support basic punctuation, for common uses like "Dread Gaze" or emojis like ":knife:"
  • Automatic numbering of challenge names should only happen if necessary
  • Challenge names should have a length limit

Retest System

  • When a challenge replies, players will have a timeout window to declare a retest
  • Retest syntax will be: @Slapchop retest [challenge name] [nature of retest]
  • Players can cancel [challenge name] [nature of cancel], which will end this retest round of the challenge immediately, not reveal bids, and print who cancelled and how.
  • SlapChop will keep track of what retests/cancels each players have submitted so far, and print them each retest round, to help prevent accidentally ability retesting multiple times in long challenges.

The Great DM Refactoring Adventure

  • Challenged individuals will receive a DM.
  • They reply to the bot with their response.
  • The bot replies asking for a bid.
  • The bid is recorded.

Better support for automated testing

This bad boy is getting pretty complicated. I obviously can't automated test with "real" discord messages, but I can probably set it up so that it can run with fake ones.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.