{"action":"created","issue":{"url":"https://api.github.com/repos/ArtemGr/Sidekick/issues/12","repository_url":"https://api.github.com/repos/ArtemGr/Sidekick","labels_url":"https://api.github.com/repos/ArtemGr/Sidekick/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/ArtemGr/Sidekick/issues/12/comments","events_url":"https://api.github.com/repos/ArtemGr/Sidekick/issues/12/events","html_url":"https://github.com/ArtemGr/Sidekick/issues/12","id":189131856,"number":12,"title":"Rolling d0s","user":{"login":"Synopt","id":7987156,"avatar_url":"https://avatars.githubusercontent.com/u/7987156?v=3","gravatar_id":"","url":"https://api.github.com/users/Synopt","html_url":"https://github.com/Synopt","followers_url":"https://api.github.com/users/Synopt/followers","following_url":"https://api.github.com/users/Synopt/following{/other_user}","gists_url":"https://api.github.com/users/Synopt/gists{/gist_id}","starred_url":"https://api.github.com/users/Synopt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Synopt/subscriptions","organizations_url":"https://api.github.com/users/Synopt/orgs","repos_url":"https://api.github.com/users/Synopt/repos","events_url":"https://api.github.com/users/Synopt/events{/privacy}","received_events_url":"https://api.github.com/users/Synopt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-14T14:54:02Z","updated_at":"2016-11-17T22:28:58Z","closed_at":null,"body":"If you `/roll 1d0` on Sidekick, the answer is always 1.\r\n\r\nIf you `/roll 1d0` on Roll20, the answer is always 0.\r\n\r\nI don't rightly know why anyone might want to roll a d0, but since it's a valid input, I was wondering if there was a reason for this discrepancy?"},"comment":{"url":"https://api.github.com/repos/ArtemGr/Sidekick/issues/comments/261390245","html_url":"https://github.com/ArtemGr/Sidekick/issues/12#issuecomment-261390245","issue_url":"https://api.github.com/repos/ArtemGr/Sidekick/issues/12","id":261390245,"user":{"login":"ArtemGr","id":41847,"avatar_url":"https://avatars.githubusercontent.com/u/41847?v=3","gravatar_id":"","url":"https://api.github.com/users/ArtemGr","html_url":"https://github.com/ArtemGr","followers_url":"https://api.github.com/users/ArtemGr/followers","following_url":"https://api.github.com/users/ArtemGr/following{/other_user}","gists_url":"https://api.github.com/users/ArtemGr/gists{/gist_id}","starred_url":"https://api.github.com/users/ArtemGr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArtemGr/subscriptions","organizations_url":"https://api.github.com/users/ArtemGr/orgs","repos_url":"https://api.github.com/users/ArtemGr/repos","events_url":"https://api.github.com/users/ArtemGr/events{/privacy}","received_events_url":"https://api.github.com/users/ArtemGr/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T22:28:58Z","updated_at":"2016-11-17T22:28:58Z","body":"> I do wonder why a d0 would come up as a 1, thought. A die with no sides?\r\n\r\nIn case of the Sidekick bot it's a technical issue. The random number generator gives me the number between 0 and 1. That's what they usually do. To get the number in a given range we multiply by the range size, e.g. `$r * 10` would be a number between 0 and 10. But to roll d10 we don't need a number between 0 and 10, we need a number between 1 and 10. So what I do is multiply by 9 and then add 1.\r\n\r\n1d0 rolls to one because of that later +1."}}
{"actor":{"display_login":"ArtemGr"}}