mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Psycho Pass Command
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
|
||||
on the [home server](https://discord.gg/sbMe32W).
|
||||
|
||||
## Commands (300)
|
||||
## Commands (301)
|
||||
### Utility:
|
||||
|
||||
* **eval**: Executes JavaScript code.
|
||||
@@ -183,6 +183,7 @@ on the [home server](https://discord.gg/sbMe32W).
|
||||
* **face-analyze**: Determines the age, gender, and race of a face.
|
||||
* **gender-analyze**: Determines the gender of a name.
|
||||
* **guess-looks**: Guesses what a user looks like.
|
||||
* **psycho-pass**: Determines your Crime Coefficient.
|
||||
* **read-qr-code**: Reads a QR Code.
|
||||
* **severe-toxicity**: Determines the toxicity of text, but less sensitive to milder language.
|
||||
* **ship**: Ships two users together.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"under100": "Suspect is not a target for enforcement action. The trigger of the Dominator will be locked.",
|
||||
"between": "Suspect is classified as a latent criminal and is a target for enforcement action. Dominator is set to Non-Lethal Paralyzer mode.",
|
||||
"over300": "Suspect poses a serious threat to society. Lethal force is authorized. The Dominator will automatically switch to Lethal Eliminator."
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const Random = require('random-js');
|
||||
const { under100, between, over300 } = require('../../assets/json/psycho-pass');
|
||||
|
||||
module.exports = class PsychoPassCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'psycho-pass',
|
||||
aliases: ['crime-coefficient'],
|
||||
group: 'analyze',
|
||||
memberName: 'psycho-pass',
|
||||
description: 'Determines your Crime Coefficient.',
|
||||
args: [
|
||||
{
|
||||
key: 'user',
|
||||
prompt: 'What user do you want to determine the Crime Coefficient of?',
|
||||
type: 'user',
|
||||
default: msg => msg.author
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg, { user }) {
|
||||
const random = new Random(Random.engines.mt19937().seed(user.id));
|
||||
const coefficient = random.integer(0, 500);
|
||||
let res;
|
||||
if (coefficient < 100) res = under100;
|
||||
else if (coefficient > 300) res = over300;
|
||||
else res = between;
|
||||
return msg.reply(
|
||||
`${msg.author.id === user.id ? 'Your' : `Suspect ${user.username}'s`} Crime Coefficient is ${coefficient}. ${res}`
|
||||
);
|
||||
}
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "85.10.4",
|
||||
"version": "85.11.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user