{"size": 442, "ext": "js", "max_stars_repo_path": "commands/diceroll.js", "max_stars_repo_name": "DeveloperP-ops/Swag-Bot", "max_stars_repo_stars_event_min_datetime": "2018-09-12T16:12:06.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-07T20:46:39.000Z", "max_issues_repo_path": "commands/diceroll.js", "max_issues_repo_name": "DeveloperP-ops/Swag-Bot", "max_issues_repo_issues_event_min_datetime": "2018-09-14T15:29:39.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-22T02:09:54.000Z", "max_forks_repo_path": "commands/diceroll.js", "max_forks_repo_name": "DeveloperP-ops/Swag-Bot", "max_forks_repo_forks_event_min_datetime": "2018-11-25T13:43:51.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-04T16:51:07.000Z"}
{"max_stars_count": 158, "max_issues_count": 10, "max_forks_count": 110, "avg_line_length": 34.0, "max_line_length": 92, "alphanum_fraction": 0.5588235294}
module.exports = {
    name: 'diceroll',
    description: 'Rolls a dice with a given number of sides, default numebr of sides is 6.',
    usage: '[number of sides]',
    execute(client, kayn, REGIONS, config, message, args, con, guilds) {
        if(!args[0]) {
            args[0] = 6;
          }

          let result = (Math.floor(Math.random() * Math.floor(args[0])));
          message.channel.send(`I rolled ${result + 1}!`);
    },
};