Fixed some issues with the sound player, search images in original message first, add max limit to dice

This commit is contained in:
TheEssem 2020-08-16 11:48:37 -05:00
parent a82341ea4f
commit 95846d32d4
5 changed files with 55 additions and 70 deletions

View file

@ -1,7 +1,7 @@
const misc = require("../utils/misc.js");
exports.run = async (message, args) => {
if (args.length === 0 || !args[0].match(/^\d+$/)) {
if (args.length === 0 || !args[0].match(/^\d+$/) || args[0] > 1000000) {
return `🎲 The dice landed on ${misc.random([...Array(6).keys()]) + 1}.`;
} else {
return `🎲 The dice landed on ${misc.random([...Array(parseInt(args[0])).keys()]) + 1}.`;