Fixed some issues with the sound player, search images in original message first, add max limit to dice
This commit is contained in:
parent
a82341ea4f
commit
95846d32d4
5 changed files with 55 additions and 70 deletions
|
@ -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}.`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue