mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Change Variable Names, Remove Useless Commands
This commit is contained in:
@@ -16,7 +16,7 @@ module.exports = class CoinFlipCommand extends Command {
|
||||
}
|
||||
|
||||
run(message) {
|
||||
const coin = sides[Math.floor(Math.random() * sides.length)];
|
||||
return message.say(`It landed on ${coin}!`);
|
||||
const side = sides[Math.floor(Math.random() * sides.length)];
|
||||
return message.say(`It landed on ${side}!`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ module.exports = class RandomNameCommand extends Command {
|
||||
return true;
|
||||
return 'Please enter either `male` or `female`.';
|
||||
},
|
||||
parse: text => text.toLowerCase()
|
||||
parse: gender => gender.toLowerCase()
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ module.exports = class QuantumCoinCommand extends Command {
|
||||
}
|
||||
|
||||
run(message) {
|
||||
const qcoin = sides[Math.floor(Math.random() * sides.length)];
|
||||
return message.say(`It landed ${qcoin}.`);
|
||||
const side = sides[Math.floor(Math.random() * sides.length)];
|
||||
return message.say(`It landed ${side}.`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ module.exports = class ShipCommand extends Command {
|
||||
|
||||
run(message, args) {
|
||||
const { things } = args;
|
||||
const percentage = Math.floor(Math.random() * 100) + 1;
|
||||
return message.say(`I'd give ${things} a ${percentage}%!`);
|
||||
const rating = Math.floor(Math.random() * 100) + 1;
|
||||
return message.say(`I'd give ${things} a ${rating}%!`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user