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

Rock paper scissors game #1333

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Rock paper scissors game #1333

wants to merge 4 commits into from

Conversation

metehus
Copy link
Member

@metehus metehus commented Oct 5, 2021

Closes #495
image
image
image
image

@metehus metehus requested a review from a team as a code owner October 5, 2021 12:54
@metehus metehus self-assigned this Oct 5, 2021
@metehus metehus added scope: commands New command(s) suggestion/addition status: waiting-for-review type: feature New feature labels Oct 6, 2021
Copy link
Member

@Doges Doges left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
20 switchcoin

@Doges
Copy link
Member

Doges commented Oct 6, 2021

e parabens

}

async run ({ t, author, channel, flags }, choice, betValue) {
console.log(betValue)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the dog doing here

const choice1 = _choice1[0].toLowerCase()
const choice2 = _choice2[0].toLowerCase()

if (choice1 === choice2) return 'draw'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch case could be used here, but meh

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could? since It's checking both choices. Also, it's more lines and ugly!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch case would look better to read imho

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not only that, but it also performs better

Copy link
Member

@moruzerinho6 moruzerinho6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the console log, and its done.

"bet": {
"draw": "You balance hasn't changed!",
"win": "Nice! You have won **$t(commons:currencyWithCount, { 'count': {{count}} })**",
"lose": "Whoops! You lose **$t(commons:currencyWithCount, { 'count': {{count}} })**"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"lose": "Whoops! You lose **$t(commons:currencyWithCount, { 'count': {{count}} })**"
"lose": "Whoops! You lost **$t(commons:currencyWithCount, { 'count': {{count}} })**"

"lose": "You lose!",
"notEnoughMoney": "You don't have this enough money to bet",
"bet": {
"draw": "You balance hasn't changed!",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"draw": "You balance hasn't changed!",
"draw": "Your balance hasn't changed!",

"draw": "It's a draw!",
"win": "You win!",
"lose": "You lose!",
"notEnoughMoney": "You don't have this enough money to bet",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"notEnoughMoney": "You don't have this enough money to bet",
"notEnoughMoney": "You don't have enough money to bet.",

"rockpaperscissors": {
"commandDescription": "Plays Rock Paper Scissors with the bot",
"commandUsage": "<rock, paper or scissors> [money to bet]",
"noChoice": "You have to give me your choice, either rock, paper or scissors",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"noChoice": "You have to give me your choice, either rock, paper or scissors",
"noChoice": "You have to choose either rock, paper, or scissors",

"notEnoughMoney": "You don't have this enough money to bet",
"bet": {
"draw": "You balance hasn't changed!",
"win": "Nice! You have won **$t(commons:currencyWithCount, { 'count': {{count}} })**",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"win": "Nice! You have won **$t(commons:currencyWithCount, { 'count': {{count}} })**",
"win": "Nice! You won **$t(commons:currencyWithCount, { 'count': {{count}} })**",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: commands New command(s) suggestion/addition status: waiting-for-review type: feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rock paper scissors command
5 participants