mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 22:27:44 +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 Command = require('../../structures/Command');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const { list } = require('../../util/Util');
|
||||||
|
const types = ['default', 'steve'];
|
||||||
|
|
||||||
module.exports = class CaveCommand extends Command {
|
module.exports = class CaveCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -9,11 +11,22 @@ module.exports = class CaveCommand extends Command {
|
|||||||
group: 'single',
|
group: 'single',
|
||||||
memberName: 'cave',
|
memberName: 'cave',
|
||||||
description: 'Sends a Minecraft cave that blends in with the chat.',
|
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) {
|
run(msg, { type }) {
|
||||||
return msg.say({ files: [path.join(__dirname, '..', '..', 'assets', 'images', 'cave.png')] });
|
return msg.say({ files: [path.join(__dirname, '..', '..', 'assets', 'images', 'cave', `${type}.png`)] });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user