calm.js 1.93 KB
const Discord = require('discord.js');

module.exports = {
    name: 'calm',
    description: 'Actual help section',
    async run(client, message, args){
        const breathe_emoji = '🫁';
        const cute_emoji = '🐶';
        const checklist_emoji = '🗒️';
        const chat_emoji = '🗣️';

        const calm = new Discord.MessageEmbed()
        .setColor('#91B2C7')
        .setDescription("It's okay, I'm here to help! What would you like to do?")
        .addFields(
            {name: ';breathe', value: `${breathe_emoji} A gif to sync your breathing to!`},
            {name: ';cute', value: `${cute_emoji} Some cute animal pictures to banish the bad feels!`},
            {name: ';checklist', value: `${checklist_emoji} I'll guide you through an anxiety checklist`},
            {name: ';chat', value: `${chat_emoji} If you just want a chat with me, I'm all ears!`}
        );

        message.channel.send({embed: calm}).then(messageEmbed => {
            messageEmbed.react(breathe_emoji);
            messageEmbed.react(cute_emoji);
            messageEmbed.react(checklist_emoji);
            messageEmbed.react(chat_emoji);
        });

        client.on('messageReactionAdd', async(reaction, user) =>{
            if (reaction.message.partial) await reaction.message.fetch();
            if (reaction.partial) await reaction.fetch();
            if (user.bot) return;
            if (!reaction.message.guild) return;

            if (reaction.emoji.name === breathe_emoji){
                message.channel.send(';breathe')
            }
            if (reaction.emoji.name === cute_emoji){
                message.channel.send(';cute')
            }
            if (reaction.emoji.name === checklist_emoji){
                message.channel.send(';checklist')
            }
            if (reaction.emoji.name === chat_emoji){
                message.channel.send('Use ;chat before your message to talk to me!')
            }
        });
    }
}