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

Feature: Choose command #866

Closed
jkriste opened this issue Nov 16, 2023 · 6 comments
Closed

Feature: Choose command #866

jkriste opened this issue Nov 16, 2023 · 6 comments
Assignees
Labels
ClemBot.Bot Issue pertains to the ClemBot.Bot codebase Discussion A thread to hold active discussion about the future of the bot or a feature enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed python Pull requests that update Python code

Comments

@jkriste
Copy link
Member

jkriste commented Nov 16, 2023

Feature

About

This feature would add a new command, called choose. Given a comma-separated list of items, ClemBot will pick one of the items at random.

Outline

Command Syntax: !choose <items...>
Preconditions (Optional): Size of items is >1.
Expected Output: One of the items will be chosen at random. ClemBot will let the user know of its choice.

Examples

Command Output Explanation
!choose a, b, c, d, e a, b, c, d, or e, equal chance. Comma-separated list with spaces.
!choose a,b,c,d,e a, b, c, d, or e, equal chance. Comma-separated list with no spaces.
!choose a Error. Optionally a, if and only if the item given does not contain whitespace. The list of items is of size 1.
!choose Error. No options were supplied.
!choose a b c d e Error. Items were not separated with commas.

Miscellaneous

  • Item weights wouldn't be too bad of an idea, but further complicates the syntax of the items. Definitely optional.
@jkriste jkriste added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed Discussion A thread to hold active discussion about the future of the bot or a feature ClemBot.Bot Issue pertains to the ClemBot.Bot codebase python Pull requests that update Python code labels Nov 16, 2023
@ShivamPatel-24
Copy link

Hi @jkriste I would like to take on this feature. Please consider assigning it to me.

@smathep
Copy link
Contributor

smathep commented Nov 23, 2023

Hi @jkriste I would like to take on this feature. Please consider assigning it to me.

Assigned to you

@smathep
Copy link
Contributor

smathep commented Nov 23, 2023

@ShivamPatel-24 Apologies, this issue was being worked on by someone already, just the assignee wasn't updated

@arock475
Copy link
Contributor

Hello I was working on this before. My bad for not commenting sooner

@smathep
Copy link
Contributor

smathep commented Nov 23, 2023

Assignee updated

jkriste added a commit that referenced this issue Dec 12, 2023
* initial commit for Choose cog

* formatting

* fixed formatting for linter

* fixed mypy type errors

* fixed suggested locations

---------

Co-authored-by: Justin Kristensen <[email protected]>
@jkriste
Copy link
Member Author

jkriste commented Dec 13, 2023

Completed via #868

@jkriste jkriste closed this as completed Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ClemBot.Bot Issue pertains to the ClemBot.Bot codebase Discussion A thread to hold active discussion about the future of the bot or a feature enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

4 participants