Files
2024-05-21 21:02:12 -04:00

31 lines
808 B
JavaScript

const Command = require('../../framework/Command');
const { PermissionFlagsBits } = require('discord.js');
const path = require('path');
const types = ['default', 'steve'];
module.exports = class CaveCommand extends Command {
constructor(client) {
super(client, {
name: 'cave',
aliases: ['cavern', 'mine'],
group: 'single',
description: 'Sends a Minecraft cave that blends in with the chat.',
details: `**Types:** ${types.join(', ')}`,
clientPermissions: [PermissionFlagsBits.AttachFiles],
args: [
{
key: 'type',
type: 'string',
default: 'default',
oneOf: types,
parse: type => type.toLowerCase()
}
]
});
}
run(msg, { type }) {
return msg.say({ files: [path.join(__dirname, '..', '..', 'assets', 'images', 'cave', `${type}.png`)] });
}
};