Person Command, Split util to where eval is owner

This commit is contained in:
Dragon Fire
2020-06-09 11:57:21 -04:00
parent 8c747aa3e6
commit 256ec32279
25 changed files with 56 additions and 26 deletions
+5 -2
View File
@@ -226,11 +226,10 @@ in the appropriate channel's topic to use it.
## Commands
Total: 465
Total: 466
### Utility:
* **eval:** Executes JavaScript code. (Owner-Only)
* **changelog:** Responds with the bot's latest 10 commits.
* **cloc:** Responds with the bot's code line count.
* **command-leaderboard:** Responds with the bot's most used commands.
@@ -246,6 +245,7 @@ Total: 465
### Utility (Owner):
* **eval:** Executes JavaScript code. (Owner-Only)
* **command-leaderboard-export:** Exports a command leaderboard JSON file. (Owner-Only)
* **command-leaderboard-import:** Imports a command leaderboard JSON file. (Owner-Only)
* **generate-commands:** Generates the commands list for Xiao's README. (Owner-Only)
@@ -338,6 +338,7 @@ Total: 465
* **light-novel-cover:** Responds with a randomly generated Light Novel cover. (NSFW)
* **lorem-picsum:** Responds with a random image of a certain size.
* **meme:** Responds with a random meme.
* **person:** Responds with a randomly generated person.
* **porn:** Responds with a random porn image. (NSFW)
* **potato:** Responds with a random potato image.
* **shiba:** Responds with a random image of a Shiba Inu.
@@ -1397,6 +1398,8 @@ here.
* newspaper (API)
- [The Onion](https://www.theonion.com/)
* the-onion ([RSS Feed](https://www.theonion.com/rss))
- [This Person Does Not Exist](https://thispersondoesnotexist.com/)
* person (API)
- [This Waifu Does Not Exist](https://www.thiswaifudoesnotexist.net/)
* waifu (API)
- [Tim's Printables](https://www.timvandevall.com/)
+2 -2
View File
@@ -16,8 +16,8 @@ client.registry
.registerDefaultTypes()
.registerTypesIn(path.join(__dirname, 'types'))
.registerGroups([
['util', 'Utility'],
['util-owner', 'Utility (Owner)'],
['util-public', 'Utility'],
['util', 'Utility (Owner)'],
['info', 'Discord Information'],
['random-res', 'Random Response'],
['random-img', 'Random Image'],
+27
View File
@@ -0,0 +1,27 @@
const Command = require('../../structures/Command');
const request = require('node-superfetch');
module.exports = class PersonCommand extends Command {
constructor(client) {
super(client, {
name: 'person',
aliases: ['this-person-does-not-exist'],
group: 'random-img',
memberName: 'person',
description: 'Responds with a randomly generated person.',
clientPermissions: ['ATTACH_FILES'],
credit: [
{
name: 'This Person Does Not Exist',
url: 'https://thispersondoesnotexist.com/',
reason: 'API'
}
]
});
}
async run(msg) {
const { body } = await request.get('https://thispersondoesnotexist.com/image');
return msg.say({ files: [{ attachment: body, name: 'this-person-does-not-exist.jpg' }] });
}
};
@@ -9,7 +9,7 @@ module.exports = class ChangelogCommand extends Command {
super(client, {
name: 'changelog',
aliases: ['updates', 'commits'],
group: 'util',
group: 'util-public',
memberName: 'changelog',
description: 'Responds with the bot\'s latest 10 commits.',
guarded: true,
@@ -9,7 +9,7 @@ module.exports = class ClocCommand extends Command {
constructor(client) {
super(client, {
name: 'cloc',
group: 'util',
group: 'util-public',
memberName: 'cloc',
description: 'Responds with the bot\'s code line count.',
guarded: true,
@@ -6,7 +6,7 @@ module.exports = class CommandLeaderboardCommand extends Command {
super(client, {
name: 'command-leaderboard',
aliases: ['cmd-lb', 'cmd-leaderboard', 'command-lb'],
group: 'util',
group: 'util-public',
memberName: 'command-leaderboard',
description: 'Responds with the bot\'s most used commands.',
guarded: true,
@@ -6,7 +6,7 @@ module.exports = class CreditCommand extends Command {
constructor(client) {
super(client, {
name: 'credit',
group: 'util',
group: 'util-public',
memberName: 'credit',
description: 'Responds with a command\'s credits list.',
guarded: true,
@@ -6,7 +6,7 @@ module.exports = class DonateCommand extends Command {
super(client, {
name: 'donate',
aliases: ['paypal'],
group: 'util',
group: 'util-public',
memberName: 'donate',
description: 'Responds with the bot\'s donation links.',
guarded: true,
@@ -8,7 +8,7 @@ module.exports = class HelpCommand extends Command {
super(client, {
name: 'help',
aliases: ['commands', 'command-list'],
group: 'util',
group: 'util-public',
memberName: 'help',
description: 'Displays a list of available commands, or detailed information for a specific command.',
guarded: true,
@@ -14,7 +14,7 @@ module.exports = class InfoCommand extends Command {
super(client, {
name: 'info',
aliases: ['stats', 'uptime'],
group: 'util',
group: 'util-public',
memberName: 'info',
description: 'Responds with detailed bot information.',
guarded: true,
@@ -6,7 +6,7 @@ module.exports = class InviteCommand extends Command {
constructor(client) {
super(client, {
name: 'invite',
group: 'util',
group: 'util-public',
memberName: 'invite',
description: 'Responds with the bot\'s invite links.',
guarded: true
@@ -6,7 +6,7 @@ module.exports = class OptionsCommand extends Command {
super(client, {
name: 'options',
aliases: ['options-list'],
group: 'util',
group: 'util-public',
memberName: 'options',
description: 'Responds with a list of server options.',
guarded: true
@@ -7,7 +7,7 @@ module.exports = class PingCommand extends Command {
super(client, {
name: 'ping',
aliases: ['pong', 'ping-pong'],
group: 'util',
group: 'util-public',
memberName: 'ping',
description: 'Checks the bot\'s ping to the Discord server.',
guarded: true
@@ -11,7 +11,7 @@ module.exports = class ReportCommand extends Command {
super(client, {
name: 'report',
aliases: ['bug', 'report-bug', 'feedback', 'contact', 'suggest', 'suggestion'],
group: 'util',
group: 'util-public',
memberName: 'report',
description: 'Reports something to the bot owner(s).',
guarded: true,
@@ -6,7 +6,7 @@ module.exports = class UnknownCommandCommand extends Command {
constructor(client) {
super(client, {
name: 'unknown-command',
group: 'util',
group: 'util-public',
memberName: 'unknown-command',
description: 'Displays help information for when an unknown command is used.',
unknown: true,
@@ -4,7 +4,7 @@ module.exports = class UsesCommand extends Command {
constructor(client) {
super(client, {
name: 'uses',
group: 'util',
group: 'util-public',
memberName: 'uses',
description: 'Responds with a command\'s usage stats.',
guarded: true,
@@ -13,7 +13,7 @@ module.exports = class CommandLeaderboardExportCommand extends Command {
'export-command-lb',
'export-command-leaderboard'
],
group: 'util-owner',
group: 'util',
memberName: 'command-leaderboard-export',
description: 'Exports a command leaderboard JSON file.',
details: 'Only the bot owner(s) may use this command.',
@@ -13,7 +13,7 @@ module.exports = class CommandLeaderboardImportCommand extends Command {
'import-command-lb',
'import-command-leaderboard'
],
group: 'util-owner',
group: 'util',
memberName: 'command-leaderboard-import',
description: 'Imports a command leaderboard JSON file.',
details: 'Only the bot owner(s) may use this command.',
@@ -5,7 +5,7 @@ module.exports = class GenerateCommandsCommand extends Command {
super(client, {
name: 'generate-commands',
aliases: ['gen-commands', 'generate-cmds', 'gen-cmds'],
group: 'util-owner',
group: 'util',
memberName: 'generate-commands',
description: 'Generates the commands list for Xiao\'s README.',
details: 'Only the bot owner(s) may use this command.',
@@ -6,7 +6,7 @@ module.exports = class GenerateCreditCommand extends Command {
super(client, {
name: 'generate-credit',
aliases: ['gen-credit'],
group: 'util-owner',
group: 'util',
memberName: 'generate-credit',
description: 'Generates the credit list for Xiao\'s README.',
details: 'Only the bot owner(s) may use this command.',
@@ -7,7 +7,7 @@ module.exports = class GenerateProcessEnvCommand extends Command {
super(client, {
name: 'generate-process-env',
aliases: ['gen-process-env', 'generate-env', 'gen-env'],
group: 'util-owner',
group: 'util',
memberName: 'generate-process-env',
description: 'Generates a backup list of Xiao\'s `process.env`.',
details: 'Only the bot owner(s) may use this command.',
@@ -5,7 +5,7 @@ module.exports = class IpCommand extends Command {
constructor(client) {
super(client, {
name: 'ip',
group: 'util-owner',
group: 'util',
memberName: 'ip',
description: 'Responds with the IP address the bot\'s server is running on.',
details: 'Only the bot owner(s) may use this command.',
@@ -5,7 +5,7 @@ module.exports = class ShutdownCommand extends Command {
super(client, {
name: 'shutdown',
aliases: ['die', 'restart', 'process.exit'],
group: 'util-owner',
group: 'util',
memberName: 'shutdown',
description: 'Shuts down the bot.',
details: 'Only the bot owner(s) may use this command.',
@@ -5,7 +5,7 @@ module.exports = class WebhookCommand extends Command {
super(client, {
name: 'webhook',
aliases: ['rin', 'rin-say'],
group: 'util-owner',
group: 'util',
memberName: 'webhook',
description: 'Posts a message to the webhook defined in the bot owner\'s `process.env`.',
details: 'Only the bot owner(s) may use this command.',
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "116.9.8",
"version": "116.10.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {