Update dicerole.js
This commit is contained in:
parent
47e5a9d18c
commit
0c377f6cce
1 changed files with 4 additions and 4 deletions
|
@ -1,11 +1,11 @@
|
||||||
exports.run = async (bot, message, args) => {
|
exports.run = async (bot, message, args) => {
|
||||||
if (args.length === 0) {
|
if (args.length === 0) {
|
||||||
message.channel.send(`🎲 The dice landed on ${Array.from(Array(6).keys()).random() + 1}.`);
|
message.channel.send(`🎲 You rolled a ${Array.from(Array(6).keys()).random() + 1}!`);
|
||||||
} else {
|
} else {
|
||||||
if (args[0].match(/^\d+$/)) {
|
if (args[0].match(/^\d+$/)) {
|
||||||
message.channel.send(`🎲 The dice landed on ${Array.from(Array(parseInt(args[0])).keys()).random() + 1}.`);
|
message.channel.send(`🎲 You rolled a ${Array.from(Array(parseInt(args[0])).keys()).random() + 1}!`);
|
||||||
} else {
|
} else {
|
||||||
message.channel.send(`🎲 The dice landed on ${Array.from(Array(6).keys()).random() + 1}.`);
|
message.channel.send(`🎲 You rolled a ${Array.from(Array(6).keys()).random() + 1}!`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -24,4 +24,4 @@ exports.run = async (bot, message, args) => {
|
||||||
description: "Rolls a dice.",
|
description: "Rolls a dice.",
|
||||||
usage: "dice"
|
usage: "dice"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue