Remove more commands

This commit is contained in:
Dragon Fire
2024-03-27 18:01:37 -04:00
parent de72d1430b
commit b73c7cfa8d
6 changed files with 17 additions and 105 deletions
-37
View File
@@ -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!`);
}
}
};
-32
View File
@@ -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!`);
}
}
};
-17
View File
@@ -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());
}
};