Lots of small changes

This commit is contained in:
lilyissillyyy
2025-08-26 22:30:54 -04:00
parent 5048fbe243
commit bda18aa3ae
11 changed files with 183 additions and 169 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ module.exports = class BoredomCommand extends Command {
credit: [
{
name: 'Bored API',
url: 'https://www.boredapi.com/',
url: 'https://bored.api.lewagon.com/',
reason: 'API'
}
]
@@ -19,7 +19,7 @@ module.exports = class BoredomCommand extends Command {
}
async run(msg) {
const { body } = await request.get('https://www.boredapi.com/api/activity/');
const { body } = await request.get('https://bored.api.lewagon.com/api/activity/');
return msg.say(`${body.activity} (${body.type})`);
}
};
+1 -1
View File
@@ -28,7 +28,7 @@ module.exports = class JokeCommand extends Command {
if (body.type === 'twopart') {
return msg.say(stripIndents`
${body.setup}
${body.delivery}
||${body.delivery}||
`);
}
return msg.say(body.joke);
+7 -3
View File
@@ -1,6 +1,10 @@
const Command = require('../../framework/Command');
const request = require('node-superfetch');
const genders = ['male', 'female', 'both'];
const genders = {
masculine: 'male',
feminine: 'female',
any: ''
};
module.exports = class NameCommand extends Command {
constructor(client) {
@@ -21,7 +25,7 @@ module.exports = class NameCommand extends Command {
key: 'gender',
type: 'string',
default: 'both',
oneOf: genders,
oneOf: Object.keys(genders),
parse: gender => gender.toLowerCase()
}
]
@@ -34,7 +38,7 @@ module.exports = class NameCommand extends Command {
.query({
inc: 'name',
noinfo: '',
gender: gender === 'both' ? '' : gender,
gender: genders[gender],
nat: 'AU,US,CA,GB'
});
const data = body.results[0].name;
+2
View File
@@ -12,6 +12,8 @@ module.exports = class OffspringCommand extends Command {
}
run(msg) {
const chance = Math.floor(Math.random() * 5500);
if (!chance) return msg.say('It\'s a... Wait, what is it?');
return msg.say(`It's a ${genders[Math.floor(Math.random() * genders.length)]}!`);
}
};
+1 -1
View File
@@ -28,7 +28,7 @@ module.exports = class PunCommand extends Command {
if (body.type === 'twopart') {
return msg.say(stripIndents`
${body.setup}
${body.delivery}
||${body.delivery}||
`);
}
return msg.say(body.joke);