Update main.js

This commit is contained in:
ZyLacx 2022-02-12 14:19:44 +01:00
parent dc4c6509bf
commit da924b9cd5

20
main.js
View file

@ -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);