mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Add Steve Cave
This commit is contained in:
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 107 KiB |
+16
-3
@@ -1,5 +1,7 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const path = require('path');
|
||||
const { list } = require('../../util/Util');
|
||||
const types = ['default', 'steve'];
|
||||
|
||||
module.exports = class CaveCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -9,11 +11,22 @@ module.exports = class CaveCommand extends Command {
|
||||
group: 'single',
|
||||
memberName: 'cave',
|
||||
description: 'Sends a Minecraft cave that blends in with the chat.',
|
||||
clientPermissions: ['ATTACH_FILES']
|
||||
details: `**Types:** ${types.join(', ')}`,
|
||||
clientPermissions: ['ATTACH_FILES'],
|
||||
args: [
|
||||
{
|
||||
key: 'type',
|
||||
prompt: `What type of cave do you want to use? Either ${list(types, 'or')}.`,
|
||||
type: 'string',
|
||||
default: 'default',
|
||||
oneOf: types,
|
||||
parse: type => type.toLowerCase()
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
return msg.say({ files: [path.join(__dirname, '..', '..', 'assets', 'images', 'cave.png')] });
|
||||
run(msg, { type }) {
|
||||
return msg.say({ files: [path.join(__dirname, '..', '..', 'assets', 'images', 'cave', `${type}.png`)] });
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user