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

Coin flips / die rolls, with results shared in the topic/DM #22045

Open
joshtriplett opened this issue May 12, 2022 · 18 comments · May be fixed by #25148
Open

Coin flips / die rolls, with results shared in the topic/DM #22045

joshtriplett opened this issue May 12, 2022 · 18 comments · May be fixed by #25148
Labels
area: widgets Poll and similar widgets help wanted

Comments

@joshtriplett
Copy link

I'd love to have a command to roll a die or flip a coin, accepting dice expressions. The server would roll the die, and fill in the result like this:

User types: /roll 2d20
Message says: * User rolled 2d20: 12, 17 (total 29)

(The value of the die roll should be preserved in message history, and not re-rolled if the message is edited. If the message or the roll is deleted, or the roll expression is edited, ideally the "(edited)" tag on the message would also say something like "roll changed".)

@joshtriplett joshtriplett changed the title Coin flips / die rolls, with results shared in the channel Coin flips / die rolls, with results shared in the topic/PM May 12, 2022
@timabbott timabbott added help wanted area: widgets Poll and similar widgets labels May 18, 2022
@timabbott
Copy link
Sponsor Member

This seems like a pretty reasonable slash command.

I wonder if there's a good Python library for doing the parsing; that seems like most of the complexity here.

@Emil2022
Copy link
Collaborator

@zulipbot claim

@zulipbot
Copy link
Member

Welcome to Zulip, @Emil2022! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

@Emil2022
Copy link
Collaborator

Hello! I'm trying to add these features to the Zcommand related files. Are there any particular files that I should be looking into outside of zcommand.py and zcommand,js?

@alya
Copy link
Contributor

alya commented Nov 16, 2022

@Emil2022 I recommend posting your question in the #development help stream in the Zulip development community, where more folks will see it.

@zulipbot
Copy link
Member

zulipbot commented Nov 27, 2022

@Emil2022 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

@Emil2022
Copy link
Collaborator

@zulipbot I am still actively working on the issue

@Emil2022
Copy link
Collaborator

Just making sure I understand this correctly. Do I need to make a pull request by tomorrow, or else I get removed from the issue?

@alya
Copy link
Contributor

alya commented Dec 1, 2022

No, posting a comment counts as "hearing back". Thanks!

@Emil2022
Copy link
Collaborator

Emil2022 commented Dec 6, 2022

@zulipbot claim

@Emil2022
Copy link
Collaborator

Emil2022 commented Dec 7, 2022

I have two doubts. Firstly, I'm not sure how I should go about recognizing content that comes after the command "/roll". Like in the example "/roll 2d20" would roll two dice that have values between 1 and 20. I'm only able to recognize "/roll" and not the entire "/roll 2d20 command.

Secondly, how should the imports be ordered? I added a import random line, and now it won't pass the built in checks due to this line being out of order.

@alya
Copy link
Contributor

alya commented Dec 8, 2022

@Emil2022 I recommend asking for help in the Zulip development community. Be sure to follow https://zulip.readthedocs.io/en/latest/contributing/asking-great-questions.html. Thanks!

@zulipbot
Copy link
Member

zulipbot commented Dec 19, 2022

@Emil2022 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

@SahilSingh177
Copy link
Collaborator

@zulipbot claim

@fqian2002
Copy link
Collaborator

@zulipbot claim

@zulipbot
Copy link
Member

zulipbot commented Apr 9, 2023

Welcome to Zulip, @fqian2002! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

@zulipbot
Copy link
Member

zulipbot commented Apr 20, 2023

@fqian2002 You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

@fqian2002
Copy link
Collaborator

yes

@laurynmm laurynmm changed the title Coin flips / die rolls, with results shared in the topic/PM Coin flips / die rolls, with results shared in the topic/DM Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: widgets Poll and similar widgets help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants