Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raffle #23

Open
7 tasks done
ryanguill opened this issue Jul 12, 2015 · 12 comments
Open
7 tasks done

raffle #23

ryanguill opened this issue Jul 12, 2015 · 12 comments

Comments

@ryanguill
Copy link
Owner

Allow ops to create a raffle and allow users to enter through DM.

OP commands:

  • !raffle -create {description} will create a new raffle
  • !raffle -update {description} will update the description
  • !raffle -cooldown {cooldown} will set the cooldown in minutes. If you don't run this command the default will be 60 minutes.
  • !raffle -reset will clear the current raffle and votes
  • !raffle -pick will pick a user from the raffle and announce the winner. Doesn't reset anything, you can run pick as many times as you need to. Not going to implement earlier winner exclusion in the beginning.

User Commands

  • !raffle will show the current raffle
  • !ticket in a DM will enter the user in the raffle and show how many tickets they have
@ryanguill
Copy link
Owner Author

!raffle output would be either:

there is no active raffle

or

{raffle description}
Direct message @watney the command !ticket to enter.  You can enter every {cooldown}

@ryanguill
Copy link
Owner Author

I also added !raffle -listtickets but only in a DM

ryanguill added a commit that referenced this issue Jul 12, 2015
leaving the ticket open in case we need to do some tweaks.
@atuttle
Copy link
Collaborator

atuttle commented Jul 12, 2015

Would be nice to be able to set a ticket limit... E.g. only one ticket per person per raffle.

Love the idea though. I'm going to use it to give away copies of my book regularly!

@ryanguill
Copy link
Owner Author

Would be nice to be able to set a ticket limit... E.g. only one ticket per person per raffle.

You got it boss.

@ryanguill
Copy link
Owner Author

  • Update help and opsHelp

ryanguill added a commit that referenced this issue Jul 12, 2015
@ryanguill
Copy link
Owner Author

Need to do some cleanup on the code at some point, there are a couple ugly parts. stringTemplates would probably help too. One thing I think we will run into is that you can only have one raffle going at a time - but supporting multiples adds quite a bit of complexity.

It would also be nice to be able to set a reminder for a specific channel that sends a message every so many minutes or after so many messages to announce / remind of the raffle - but I think this functionality should be more generic and available for a lot of uses and I want to think about it some more.

@atuttle
Copy link
Collaborator

atuttle commented Jul 13, 2015

What do you guys think of this?

  • While there's an active raffle
  • Every hour on the hour
  • If the last message to #cfml-general wasn't the raffle reminder, then remind (as if someone had typed !raffle)

@ryanguill
Copy link
Owner Author

I want to set this up in the core as something you can register for, so that we dont have a bunch of plugins with their own timers. So something like

bot.register({
type: 'interval',
pattern: {milliseconds: 1000 * 60 * 60},
f: foo,
...

then you could do whatever logic in the handling function. I want to use the same functionality for the rss watchers and bug announcers.

@atuttle
Copy link
Collaborator

atuttle commented Jul 13, 2015

👍

@ryanguill
Copy link
Owner Author

add the following:

  • !raffle -addOwner @username Allow a user to close / pick winners / update the raffle, etc. Add multiple users
  • !raffle -owners
  • !raffle -close stop allowing tickets to be dispensed
  • !raffle -open reopen a closed raffle
  • allow owners and ops to set a UTC datetime that the raffle should close

@atuttle
Copy link
Collaborator

atuttle commented Aug 10, 2015

Would !raffle -owners:add @username be germane? It kinda resembles the heroku toolbelt approach, which I'm personally fond of. Not sure how many other commands already exist that this would be inconsistent with though...

@ryanguill
Copy link
Owner Author

im not against it, when it comes time to work on this ill research if there are anything that would be inconsistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants