diff --git a/main.js b/main.js index 70ab622..726fb1c 100755 --- a/main.js +++ b/main.js @@ -40,7 +40,7 @@ client.once('ready', () => { client.channels.cache.get('780439236867653635').send('Just turned on!'); } console.log('Running!'); - refreshPings(); + // refreshPings(); }); client.on('messageCreate', gotMessage); @@ -142,17 +142,21 @@ function move(message, channelId) { newMsgAttachments.push(new MessageAttachment(currAttachment.url)); } - client.channels.cache.get(mentionedChannelId).send({ content: `Sent by ${msg.author}\nmooved ${message.author}`, files: newMsgAttachments }); - } - if (msg.embeds.length > 0) { - client.channels.cache.get(mentionedChannelId) - .send({ content: `Sent by ${msg.author}\nmooved ${message.author}`, embeds: msg.embeds }); + if (msg.embeds.length > 0) { + client.channels.cache.get(mentionedChannelId) + .send({ content: `Sent by ${msg.author}\nmooved ${message.author}`, embeds: msg.embeds }); + } + else { + client.channels.cache.get(mentionedChannelId) + .send({ content: `Sent by ${msg.author}\nmooved ${message.author}`, files: newMsgAttachments }); + } } else { const embed = new Discord.MessageEmbed() .setColor(help.randomColor()) .addField('MOO', `Sent by ${msg.author}\nmooved ${message.author}`) - .addField('Message:', msg.content); + .addField( + 'Message:', msg.content); client.channels.cache.get(mentionedChannelId).send({ embeds: [embed], }); @@ -170,6 +174,7 @@ async function whoAsked(message) { message.reply({ embeds: [help.getGifEmbed(gifs, gifAmount)] }); } +/** async function pingEvent() { const currentDay = new Date().getDate(); const currentMonth = new Date().getMonth(); @@ -249,5 +254,6 @@ async function refreshPings() { await setTimeout(eventsCountdown, 12 * 60 * 60 * 100); } } + */ client.login(process.env.TOKEN); \ No newline at end of file