mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
31 lines
808 B
JavaScript
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`)] });
|
|
}
|
|
};
|