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
+2 -1
View File
@@ -15,7 +15,7 @@ Xiao is a Discord bot coded in JavaScript with
The bot is no longer available for invite. You can self-host the bot, or use her
on the [home server](https://discord.gg/sbMe32W).
## Commands (314)
## Commands (315)
### Utility:
* **eval:** Executes JavaScript code.
@@ -347,6 +347,7 @@ on the [home server](https://discord.gg/sbMe32W).
* **math:** Evaluates a math expression.
* **prime:** Determines if a number is a prime number.
* **roman-numeral:** Converts a number to roman numerals.
* **scientific-notation:** Converts a number to scientific notation.
* **scrabble-score:** Responds with the scrabble score of a word.
* **units:** Converts units to/from other units.
@@ -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());
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "91.8.13",
"version": "91.9.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {