tonytins/commgr

Feature: Raffle Draw

sc-idevops opened this issue · 5 comments

It wouldn't be too hard to modify this program to also be able to pick one of the entries at random for when people do raffles! :3

This is definitely doable but would have to be saved for when I move to a database.

Okay, I've been thinking this over and it is possible to create a raffle system with the current architecture. It'll be accessed via a subcommand since it differs from normal routine. artm raffle --slots 5 --tickets 20 --ych "Night Sky". The slots and tickets are max that are allowed and will generate a number based on those limitations. So the ouput would be:

{
  "slot": "2",
  "ticket": "15",
  "ych": "Night Sky"
}

Of course, this is very basic and a lot of room for error but it's a start. It's based on this YCH raffle.

ah I see how this raffle is set up. Users are self assigned a number on the order they are commented in. I was originally thinking about a twitter raffle where you can plug in someone's name and data in and then select one of those, but I think this implementation is a lot easier and requires less input. (all it is really is, is a RNG)

Yes. I do like both the idea of a raffle and your Twitter-based approach. It's just the current architecture doesn't really allow for it, at the moment. I figured this would be the best compromise in the meantime.

The architecture was completely rewritten starting with 0.4. I think this feature may finally become more of a reality.