mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 06:37:32 +02:00
Improve coolness
This commit is contained in:
+10
-10
@@ -1,12 +1,12 @@
|
|||||||
[
|
[
|
||||||
"is the coolest being to walk this Earth.",
|
"the coolest being to walk this Earth.",
|
||||||
"is extremely amazingly amazing.",
|
"extremely amazingly amazing.",
|
||||||
"is as cool as ice.",
|
"as cool as ice.",
|
||||||
"is an extremely cool dude.",
|
"an extremely cool dude.",
|
||||||
"is pretty sweet, not gonna lie.",
|
"pretty sweet, not gonna lie.",
|
||||||
"is okay, nothing special.",
|
"okay, nothing special.",
|
||||||
"is just not all that neat.",
|
"just not all that neat.",
|
||||||
"is awful, honestly.",
|
"awful, honestly.",
|
||||||
"is terrible in every way.",
|
"terrible in every way.",
|
||||||
"smells like a sack of diapers."
|
"the worst thing I've ever had the displeasure of knowing."
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const levels = require('../../assets/json/coolness');
|
const texts = require('../../assets/json/coolness');
|
||||||
|
|
||||||
module.exports = class CoolnessCommand extends Command {
|
module.exports = class CoolnessCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -20,14 +20,14 @@ module.exports = class CoolnessCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run(msg, { user }) {
|
run(msg, { user }) {
|
||||||
|
const authorUser = user.id === msg.author.id;
|
||||||
const coolness = Math.round(((user.id / this.client.user.id) * 10) / 2);
|
const coolness = Math.round(((user.id / this.client.user.id) * 10) / 2);
|
||||||
if (user.id === this.client.user.id) return msg.say('Me? I think I\'m the very best, like no one ever was.');
|
if (user.id === this.client.user.id) return msg.reply('Me? I think I\'m the very best, like no one ever was.');
|
||||||
if (this.client.isOwner(user)) {
|
if (this.client.isOwner(user)) {
|
||||||
if (this.client.isOwner(msg.author)) {
|
if (authorUser) return msg.reply('You\'re the best owner a bot could ask for! ❤');
|
||||||
return msg.say(`${user.username}, you're the best owner a bot could ask for! ❤`);
|
return msg.reply(`Don't tell them I said this but I think ${user.username} smells like a sack of diapers.`);
|
||||||
}
|
|
||||||
return msg.say(`Don't tell them I said this but I think ${user.username} ${levels[levels.length - 1]}`);
|
|
||||||
}
|
}
|
||||||
return msg.say(`${user.username} ${levels[Math.min(coolness, levels.length - 1)]}`);
|
const text = texts[Math.min(coolness, texts.length - 1)];
|
||||||
|
return msg.reply(`${authorUser ? 'You are' : `${user.username} is`} ${text}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "72.0.1",
|
"version": "72.0.2",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user