mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 10:19:11 +02:00
Remove more commands
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# Dependency Files
|
# Dependency Files
|
||||||
node_modules/
|
node_modules/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
|
|
||||||
# Log Files
|
# Log Files
|
||||||
logs/
|
logs/
|
||||||
|
|||||||
@@ -12,20 +12,19 @@ If you self-host this you're nuts.
|
|||||||
4. Run `cd xiao` to move into the folder that you just created.
|
4. Run `cd xiao` to move into the folder that you just created.
|
||||||
5. Create a file named `.env` and fill it out as shown in `.env.example`.
|
5. Create a file named `.env` and fill it out as shown in `.env.example`.
|
||||||
6. Run `apt update` and `apt upgrade` to install the latest dependencies of your distro.
|
6. Run `apt update` and `apt upgrade` to install the latest dependencies of your distro.
|
||||||
7. Run `apt install python` to install python.
|
7. Run `apt install ffmpeg` to install ffmpeg.
|
||||||
8. Run `apt install ffmpeg` to install ffmpeg.
|
8. [Follow these instructions to install the dependencies for `node-canvas`](https://github.com/Automattic/node-canvas/wiki/Installation%3A-Ubuntu-and-other-Debian-based-systems).
|
||||||
9. [Follow these instructions to install the dependencies for `node-canvas`](https://github.com/Automattic/node-canvas/wiki/Installation%3A-Ubuntu-and-other-Debian-based-systems).
|
9. Run `apt install liblqr-1-0-dev liblqr-1-0` to install liblqr (needed for ImageMagick).
|
||||||
10. Run `apt install liblqr-1-0-dev liblqr-1-0` to install liblqr (needed for ImageMagick).
|
10. [Follow these instructions to install ImageMagick](https://www.tecmint.com/install-imagemagick-on-debian-ubuntu/).
|
||||||
11. [Follow these instructions to install ImageMagick](https://www.tecmint.com/install-imagemagick-on-debian-ubuntu/).
|
11. [Follow these instructions to set up Redis](https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04). Remember to set up a password!
|
||||||
12. [Follow these instructions to set up Redis](https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04). Remember to set up a password!
|
12. Run `apt install libtool` so sodium can compile if necessary. **(Optional)**
|
||||||
13. Run `apt install libtool` so sodium can compile if necessary. **(Optional)**
|
13. Download [the NSFW model](https://github.com/gantman/nsfw_model) and extract the contents to `<xiao folder>/tf_models/nsfw`.
|
||||||
14. Download [the NSFW model](https://github.com/gantman/nsfw_model) and extract the contents to `<xiao folder>/tf_models/nsfw`.
|
14. Run `apt install wine` to install wine.
|
||||||
15. Run `apt install wine` to install wine.
|
15. Run `dpkg --add-architecture i386` to allow installation of wine32.
|
||||||
16. Run `dpkg --add-architecture i386` to allow installation of wine32.
|
16. Run `apt update` again.
|
||||||
17. Run `apt update` again.
|
17. Run `apt install wine32` to install wine32.
|
||||||
18. Run `apt install wine32` to install wine32.
|
18. Run `apt install xvfb` to install xvfb.
|
||||||
19. Run `apt install xvfb` to install xvfb.
|
19. Run `npm i --omit=dev` in the folder you cloned the bot.
|
||||||
20. Run `npm i --production` in the folder you cloned the bot.
|
20. Run `npx parse-domain-update` to update the domain list for `parse-domain`.
|
||||||
21. Run `npx parse-domain-update` to update the domain list for `parse-domain`.
|
21. Run `npm i -g pm2` to install PM2.
|
||||||
22. Run `npm i -g pm2` to install PM2.
|
22. Run `pm2 start Xiao.js --name xiao` to run the bot.
|
||||||
23. Run `pm2 start Xiao.js --name xiao` to run the bot.
|
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
const Command = require('../../framework/Command');
|
|
||||||
const RSS = require('rss-parser');
|
|
||||||
const { stripIndents } = require('common-tags');
|
|
||||||
|
|
||||||
module.exports = class TheOnionCommand extends Command {
|
|
||||||
constructor(client) {
|
|
||||||
super(client, {
|
|
||||||
name: 'the-onion',
|
|
||||||
aliases: ['onion'],
|
|
||||||
group: 'random-res',
|
|
||||||
memberName: 'the-onion',
|
|
||||||
description: 'Responds with a random "The Onion" article.',
|
|
||||||
credit: [
|
|
||||||
{
|
|
||||||
name: 'The Onion',
|
|
||||||
url: 'https://www.theonion.com/',
|
|
||||||
reason: 'RSS Feed',
|
|
||||||
reasonURL: 'https://www.theonion.com/rss'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async run(msg) {
|
|
||||||
const parser = new RSS();
|
|
||||||
try {
|
|
||||||
const feed = await parser.parseURL('https://www.theonion.com/rss');
|
|
||||||
const article = feed.items[Math.floor(Math.random() * feed.items.length)];
|
|
||||||
return msg.say(stripIndents`
|
|
||||||
${article.title}
|
|
||||||
${article.link}
|
|
||||||
`);
|
|
||||||
} catch (err) {
|
|
||||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
const Command = require('../../framework/Command');
|
|
||||||
const request = require('node-superfetch');
|
|
||||||
|
|
||||||
module.exports = class ThisForThatCommand extends Command {
|
|
||||||
constructor(client) {
|
|
||||||
super(client, {
|
|
||||||
name: 'this-for-that',
|
|
||||||
aliases: ['its-this-for-that'],
|
|
||||||
group: 'random-res',
|
|
||||||
memberName: 'this-for-that',
|
|
||||||
description: 'So, basically, it\'s like a bot command for this dumb meme.',
|
|
||||||
credit: [
|
|
||||||
{
|
|
||||||
name: 'Wait, what does your startup do?',
|
|
||||||
url: 'http://itsthisforthat.com/',
|
|
||||||
reason: 'API',
|
|
||||||
reasonURL: 'http://itsthisforthat.com/api.php'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async run(msg) {
|
|
||||||
try {
|
|
||||||
const { text } = await request.get('http://itsthisforthat.com/api.php?json');
|
|
||||||
const body = JSON.parse(text);
|
|
||||||
return msg.say(`So, basically, it's like a ${body.this} for ${body.that}.`);
|
|
||||||
} catch (err) {
|
|
||||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
const Command = require('../../framework/Command');
|
|
||||||
const UserAgent = require('user-agents');
|
|
||||||
|
|
||||||
module.exports = class UserAgentCommand extends Command {
|
|
||||||
constructor(client) {
|
|
||||||
super(client, {
|
|
||||||
name: 'user-agent',
|
|
||||||
group: 'random-res',
|
|
||||||
memberName: 'user-agent',
|
|
||||||
description: 'Responds with a random User Agent.'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
run(msg) {
|
|
||||||
return msg.say(new UserAgent().toString());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -78,7 +78,6 @@
|
|||||||
"parse-domain": "^8.0.2",
|
"parse-domain": "^8.0.2",
|
||||||
"pokersolver": "^2.1.4",
|
"pokersolver": "^2.1.4",
|
||||||
"random-js": "^2.1.0",
|
"random-js": "^2.1.0",
|
||||||
"rss-parser": "^3.13.0",
|
|
||||||
"semver": "^7.6.0",
|
"semver": "^7.6.0",
|
||||||
"sherlockjs": "^1.4.2",
|
"sherlockjs": "^1.4.2",
|
||||||
"stackblur-canvas": "^2.7.0",
|
"stackblur-canvas": "^2.7.0",
|
||||||
@@ -86,7 +85,6 @@
|
|||||||
"tictactoe-minimax-ai": "github:marianoheller/tic-tac-toe-minimax",
|
"tictactoe-minimax-ai": "github:marianoheller/tic-tac-toe-minimax",
|
||||||
"twemoji-parser": "^14.0.0",
|
"twemoji-parser": "^14.0.0",
|
||||||
"twitter-openapi-typescript": "^0.0.31",
|
"twitter-openapi-typescript": "^0.0.31",
|
||||||
"user-agents": "^1.1.148",
|
|
||||||
"valid-url": "^1.0.9",
|
"valid-url": "^1.0.9",
|
||||||
"wavefile": "^11.0.0",
|
"wavefile": "^11.0.0",
|
||||||
"winston": "^3.12.0",
|
"winston": "^3.12.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user