Files
xiao/commands/single/cave.js
T
2024-04-07 19:06:19 -04:00

32 lines
831 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',
memberName: 'cave',
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`)] });
}
};