mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Butt command, improve scrabble score
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
|
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).
|
on the [home server](https://discord.gg/sbMe32W).
|
||||||
|
|
||||||
## Commands (298)
|
## Commands (299)
|
||||||
### Utility:
|
### Utility:
|
||||||
|
|
||||||
* **eval**: Executes JavaScript code.
|
* **eval**: Executes JavaScript code.
|
||||||
@@ -175,6 +175,7 @@ on the [home server](https://discord.gg/sbMe32W).
|
|||||||
|
|
||||||
### Analyzers:
|
### Analyzers:
|
||||||
|
|
||||||
|
* **butt**: Determines a user's butt quality.
|
||||||
* **coolness**: Determines a user's coolness.
|
* **coolness**: Determines a user's coolness.
|
||||||
* **dick**: Determines your dick size.
|
* **dick**: Determines your dick size.
|
||||||
* **gender-analyze**: Determines the gender of a name.
|
* **gender-analyze**: Determines the gender of a name.
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
[
|
||||||
|
"average at best",
|
||||||
|
"pretty ok",
|
||||||
|
"decent",
|
||||||
|
"solid",
|
||||||
|
"flat af",
|
||||||
|
"meh",
|
||||||
|
"out of this world bby :)",
|
||||||
|
"tiny",
|
||||||
|
"terrible",
|
||||||
|
"nice ;)",
|
||||||
|
"god-awful",
|
||||||
|
"utterly unremarkable",
|
||||||
|
"of exceptional quality",
|
||||||
|
"incredible",
|
||||||
|
"nice and smooth",
|
||||||
|
"just so round... and out there...",
|
||||||
|
"unbelievable",
|
||||||
|
"so ugly only ur momma could love it",
|
||||||
|
"bootylicious",
|
||||||
|
"appalling",
|
||||||
|
"heave-inducing",
|
||||||
|
"unrepentantly uninteresting",
|
||||||
|
"garbage-tier",
|
||||||
|
"wretched",
|
||||||
|
"regal"
|
||||||
|
]
|
||||||
@@ -24,6 +24,5 @@
|
|||||||
"w": 4,
|
"w": 4,
|
||||||
"x": 8,
|
"x": 8,
|
||||||
"y": 4,
|
"y": 4,
|
||||||
"z": 10,
|
"z": 10
|
||||||
" ": 0
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
const Command = require('../../structures/Command');
|
||||||
|
const Random = require('random-js');
|
||||||
|
const texts = require('../../assets/json/butt');
|
||||||
|
|
||||||
|
module.exports = class ButtCommand extends Command {
|
||||||
|
constructor(client) {
|
||||||
|
super(client, {
|
||||||
|
name: 'butt',
|
||||||
|
aliases: ['butts', 'ass', 'booty'],
|
||||||
|
group: 'analyze',
|
||||||
|
memberName: 'butt',
|
||||||
|
description: 'Determines a user\'s butt quality.',
|
||||||
|
args: [
|
||||||
|
{
|
||||||
|
key: 'user',
|
||||||
|
prompt: 'Which user do you want to determine the butt quality of?',
|
||||||
|
type: 'user',
|
||||||
|
default: msg => msg.author
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
run(msg, { user }) {
|
||||||
|
const random = new Random(Random.engines.mt19937().seed(user.id));
|
||||||
|
const quality = random.integer(0, texts.length - 1);
|
||||||
|
return msg.reply(`${user.id === msg.author.id ? 'ur' : `${user.username}'s`} butt is ${texts[quality]}`);
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -14,10 +14,6 @@ module.exports = class ScrabbleScoreCommand extends Command {
|
|||||||
key: 'word',
|
key: 'word',
|
||||||
prompt: 'What word would you like to get the scrabble score of?',
|
prompt: 'What word would you like to get the scrabble score of?',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
validate: word => {
|
|
||||||
if (/^[A-Za-z ]+$/i.test(word.toLowerCase())) return true;
|
|
||||||
return 'Invalid word, please only use A-Z and space.';
|
|
||||||
},
|
|
||||||
parse: word => word.toLowerCase()
|
parse: word => word.toLowerCase()
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -26,7 +22,10 @@ module.exports = class ScrabbleScoreCommand extends Command {
|
|||||||
|
|
||||||
run(msg, { word }) {
|
run(msg, { word }) {
|
||||||
let score = 0;
|
let score = 0;
|
||||||
for (const letter of word.split('')) score += letters[letter];
|
for (const letter of word.split('')) {
|
||||||
|
if (!letters[letter]) continue;
|
||||||
|
score += letters[letter];
|
||||||
|
}
|
||||||
return msg.reply(score);
|
return msg.reply(score);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "90.0.7",
|
"version": "90.1.0",
|
||||||
"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