Skip to content

Conversation

@Razi91
Copy link
Contributor

@Razi91 Razi91 commented Jun 4, 2020

Adds roll command like !roll 1d6 (with optional modifiers like 2d6-1)

roll command

roll command

roll command

roll command

roll command

clean and fix
}

const instruction =
'Wpisz `!roll [ilość kości]d[ilość ścian]`, aby rzucić kośćmi, np `!roll 2d6+1`';
Copy link
Member

Choose a reason for hiding this comment

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

Liczba kości i liczba ścian :)

if (parsed.count <= 0 || parsed.count > MAX_COUNT || parsed.dice <= 0 || parsed.dice > MAX_DICE) {
throw new Error('Invalid argument values');
}
const rolls = Array.apply(null, Array(parsed.count))
Copy link
Member

Choose a reason for hiding this comment

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

Array.from({ length: parsed.count })

@typeofweb typeofweb merged commit 861aa46 into typeofweb-org:master Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants