Remove bird, shiba, google-doodle

This commit is contained in:
lilyissillyyy
2025-08-27 21:26:42 -04:00
parent 8c7f0458d0
commit f34cfe7f1b
5 changed files with 2 additions and 122 deletions
-47
View File
@@ -1,47 +0,0 @@
const Command = require('../../framework/Command');
const { PermissionFlagsBits } = require('discord.js');
const request = require('node-superfetch');
const moment = require('moment');
module.exports = class GoogleDoodleCommand extends Command {
constructor(client) {
super(client, {
name: 'google-doodle',
group: 'events',
description: 'Responds with a Google Doodle, either the latest one or a random one from the past.',
clientPermissions: [PermissionFlagsBits.AttachFiles],
credit: [
{
name: 'Google',
url: 'https://www.google.com/',
reason: 'Google Doodles API',
reasonURL: 'https://www.google.com/doodles'
}
],
args: [
{
key: 'month',
type: 'month',
default: 'latest'
},
{
key: 'year',
type: 'integer',
default: ''
}
]
});
}
async run(msg, { month, year }) {
const latest = month === 'latest';
const now = new Date();
if (latest) month = now.getMonth() + 1;
if (!year) year = now.getFullYear();
const { body } = await request.get(`https://www.google.com/doodles/json/${year}/${month}`);
if (!body.length) return msg.say('Could not find any results.');
const data = body[latest ? 0 : Math.floor(Math.random() * body.length)];
const runDate = moment.utc(data.run_date_array.join('-')).format('MMMM Do, YYYY');
return msg.say(`${runDate}: ${data.share_text}`, { files: [`https:${data.url}`] });
}
};
-33
View File
@@ -1,33 +0,0 @@
const Command = require('../../framework/Command');
const { PermissionFlagsBits } = require('discord.js');
const request = require('node-superfetch');
module.exports = class BirdCommand extends Command {
constructor(client) {
super(client, {
name: 'bird',
aliases: ['birb'],
group: 'random-img',
description: 'Responds with a random image of a bird.',
clientPermissions: [PermissionFlagsBits.AttachFiles],
credit: [
{
name: 'shibe.online',
url: 'https://shibe.online/',
reason: 'API'
}
]
});
}
async run(msg) {
const { body } = await request
.get('https://shibe.online/api/birds')
.query({
count: 1,
urls: true,
httpsUrls: true
});
return msg.say({ files: [body[0]] });
}
};
-33
View File
@@ -1,33 +0,0 @@
const Command = require('../../framework/Command');
const { PermissionFlagsBits } = require('discord.js');
const request = require('node-superfetch');
module.exports = class ShibaCommand extends Command {
constructor(client) {
super(client, {
name: 'shiba',
aliases: ['shiba-inu', 'shibe', 'shibe-inu', 'doge'],
group: 'random-img',
description: 'Responds with a random image of a Shiba Inu.',
clientPermissions: [PermissionFlagsBits.AttachFiles],
credit: [
{
name: 'shibe.online',
url: 'https://shibe.online/',
reason: 'API'
}
]
});
}
async run(msg) {
const { body } = await request
.get('https://shibe.online/api/shibes')
.query({
count: 1,
urls: true,
httpsUrls: true
});
return msg.say({ files: [body[0]] });
}
};