mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 18:17:38 +00:00
21 lines
496 B
JavaScript
21 lines
496 B
JavaScript
const Utils = require("../utils");
|
|
|
|
const { getCache } = require("../info");
|
|
|
|
async function handler(message) {
|
|
const cache = getCache();
|
|
const skins = Object.values(cache).filter(skin => skin.type === "CLASSIC");
|
|
const skin = skins[Math.floor(Math.random() * skins.length)];
|
|
const { md5 } = skin;
|
|
await Utils.postSkin({
|
|
md5,
|
|
dest: message.channel
|
|
});
|
|
}
|
|
|
|
module.exports = {
|
|
usage: "",
|
|
description: "Show information about a random skin",
|
|
command: "random",
|
|
handler
|
|
};
|