mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 00:09:08 +02:00
Scientific notation command
This commit is contained in:
@@ -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());
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user