discord_bot/commands/misc/random.js
SileNce5k e7cdd425d1
Split commands into subdirectories
* Move command files into directories

* Edit relative paths

* Update gitignore

* Finish support for commands in subdir

* Split up getCommandFiles into own function

* Add support for subdirs on help command
2021-07-18 11:24:46 +02:00

16 lines
No EOL
388 B
JavaScript

const randomNumber = require('../../util/randomNumber')
module.exports = {
name: 'random',
description: 'Returns a value between two numbers (default = 1-10)',
execute({ message, args }) {
let min = 1
let max = 10
if (args[0] && args[1]) {
min = parseInt(args[0])
max = parseInt(args[1])
}
let randNumber= randomNumber(min,max)
message.channel.send(randNumber)
}
};