nodbot/dot-commands/joint.js

17 lines
510 B
JavaScript
Raw Normal View History

2022-06-20 23:00:42 +00:00
const fn = require('../functions.js');
const { emoji } = require('../strings.json');
module.exports = {
name: 'joint',
description: 'Send a random weed-themed phrase.',
usage: '.joint',
2023-01-07 18:16:05 +00:00
alias: ['bong', 'blunt', 'bowl', 'pipe'],
2022-06-20 23:00:42 +00:00
execute(message, commandData) {
let joints = [];
for (const entry of message.client.joints.map(joint => joint.content)) {
joints.push(entry);
}
const randIndex = Math.floor(Math.random() * joints.length);
message.reply(`${joints[randIndex]} ${emoji.joint}`);
}
}