nodbot/commands/joint.js

14 lines
412 B
JavaScript
Raw Normal View History

const { emoji } = require('../src/strings.json');
2021-07-06 21:37:29 +00:00
module.exports = {
name: 'joint',
description: 'Pass the joint!',
execute(message, args) {
let phrases = [];
for (const entry of message.client.potphrases.map(potphrase => potphrase.content)) {
phrases.push(entry);
}
const randIndex = Math.floor(Math.random() * phrases.length);
message.channel.send(`${phrases[randIndex]} ${emoji.joint}`);
2021-07-06 21:37:29 +00:00
}
}