이세린

add .react, does not work in calm.js yet

...@@ -4,17 +4,26 @@ module.exports = { ...@@ -4,17 +4,26 @@ module.exports = {
4 name: 'calm', 4 name: 'calm',
5 description: 'Actual help section', 5 description: 'Actual help section',
6 async run(client, message, args){ 6 async run(client, message, args){
7 + const breathe_emoji = '🫁 ';
8 + const cute_emoji = '🐶';
9 + const checklist_emoji = '🗒️';
10 + const chat_emoji = '🗣️';
11 +
7 const calm = new Discord.MessageEmbed() 12 const calm = new Discord.MessageEmbed()
8 .setColor('#91B2C7') 13 .setColor('#91B2C7')
9 .setDescription("It's okay, I'm here to help! What would you like to do?") 14 .setDescription("It's okay, I'm here to help! What would you like to do?")
10 .addFields( 15 .addFields(
11 - {name: ';breathe', value: "A gif to sync your breathing to!"}, 16 + {name: ';breathe', value: `${breathe_emoji} A gif to sync your breathing to!`},
12 - {name: ';cute', value: "Some cute animal pictures to banish the bad feels!"}, 17 + {name: ';cute', value: `${cute_emoji} Some cute animal pictures to banish the bad feels!`},
13 - {name: ';checklist', value: "I'll guide you through an anxiety checklist"}, 18 + {name: ';checklist', value: `${checklist_emoji} I'll guide you through an anxiety checklist`},
14 - {name: ';chat', value: "If you just want a chat with me, I'm all ears!"} 19 + {name: ';chat', value: `${chat_emoji} If you just want a chat with me, I'm all ears!`}
15 ); 20 );
16 - message.channel.send(calm); 21 +
22 + message.channel.send({embed: calm}).then(messageEmbed => {
23 + messageEmbed.react(breathe_emoji);
24 + messageEmbed.react(cute_emoji);
25 + messageEmbed.react(checklist_emoji);
26 + messageEmbed.react(chat_emoji);
27 + });
17 } 28 }
18 } 29 }
...\ No newline at end of file ...\ No newline at end of file
19 -
20 -//Add reaction event flag later
...\ No newline at end of file ...\ No newline at end of file
......
1 //bot basic primer 1 //bot basic primer
2 const Discord = require('discord.js'); 2 const Discord = require('discord.js');
3 3
4 -const client = new Discord.Client(); 4 +const client = new Discord.Client({partials: ["MESSAGE", "CHANNEL", "REACTION"]});
5 5
6 const prefix = ';'; 6 const prefix = ';';
7 7
...@@ -47,6 +47,12 @@ client.on('message', async message => { ...@@ -47,6 +47,12 @@ client.on('message', async message => {
47 message.channel.send('pong!'); 47 message.channel.send('pong!');
48 } 48 }
49 49
50 + if (command === 'react') {
51 + message.channel.send('react?').then(reactmessage => {
52 + reactmessage.react('😄');
53 + })
54 + }
55 +
50 if(!client.commands.has(command)){ 56 if(!client.commands.has(command)){
51 return; 57 return;
52 } 58 }
......