mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 00:09:08 +02:00
Ship Name Command
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
const Command = require('../../structures/Command');
|
||||
|
||||
module.exports = class ShipNameCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'ship-name',
|
||||
group: 'text-edit',
|
||||
memberName: 'ship-name',
|
||||
description: 'Creates a ship name from two names.',
|
||||
args: [
|
||||
{
|
||||
key: 'start',
|
||||
prompt: 'What name should be at the start of the ship name?',
|
||||
type: 'string',
|
||||
validate: start => {
|
||||
if (start.length < 50) return true;
|
||||
return 'The start name must be under 50 characters.';
|
||||
},
|
||||
parse: start => start.toLowerCase()
|
||||
},
|
||||
{
|
||||
key: 'end',
|
||||
prompt: 'What name should be at the end of the ship name?',
|
||||
type: 'string',
|
||||
validate: end => {
|
||||
if (end.length < 50) return true;
|
||||
return 'The end name must be under 50 characters.';
|
||||
},
|
||||
parse: end => end.toLowerCase()
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
const { start, end } = args;
|
||||
return msg.say(`${start.slice(0, Math.floor(start.length / 2))}${end.slice(Math.floor(end.length / 2))}`);
|
||||
}
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "38.1.1",
|
||||
"version": "38.2.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Shard.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user