mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Scientific notation command
This commit is contained in:
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "91.8.13",
|
||||
"version": "91.9.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user