@diamondbot/vase-command
Version:
DiamondBot command that posts AI generated vases
30 lines (23 loc) • 719 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _core = require("@diamondbot/core");
class VaseCommand extends _core.ChatCommand {
constructor(options = {}) {
super(Object.assign({
name: 'vase',
description: 'A decorative container without handles'
}, options));
}
async exec({
channel
}) {
const num = Math.floor(Math.random() * 20000) + 1; // Number between 1 and 20000 inclusive
const padded = num.toString().padStart(7, '0');
const vase = `http://thisvesseldoesnotexist.s3-website-us-west-2.amazonaws.com/public/v2/fakes/${padded}.jpg`;
await channel.send(vase);
}
}
exports.default = VaseCommand;