Scientific notation command

This commit is contained in:
Daniel Odendahl Jr
2018-09-21 15:03:34 +00:00
parent 8f5542bf70
commit 4d539182f7
3 changed files with 27 additions and 2 deletions
@@ -0,0 +1,24 @@
const Command = require('../../structures/Command');
module.exports = class ScientificNotationCommand extends Command {
constructor(client) {
super(client, {
name: 'scientific-notation',
aliases: ['science-notation', 'e+', 'exponential-notation', 'exponential', 'scientific'],
group: 'number-edit',
memberName: 'scientific-notation',
description: 'Converts a number to scientific notation.',
args: [
{
key: 'number',
prompt: 'What number do you want to convert to scientific notation?',
type: 'float'
}
]
});
}
run(msg, { number }) {
return msg.reply(number.toExponential());
}
};