Update node.js

This commit is contained in:
ZyLacx 2021-02-04 23:35:15 +01:00
parent a98b20065e
commit 01e8edb6ac

40
node.js
View file

@ -40,32 +40,36 @@ client.on('message', message => {
let msg = message.content.toLowerCase();
if(message.content.includes(":USureBoutThat:")){
message.channel.send("<:ugh:802988623271428117>");
}
if (message.attachments.first() === undefined) {
}
if (message.content.startsWith("http")) {
author = message.author.id;
storedLink = message.content;
messageId = message.id;
yes = true;
linkNo++;
}
else if (message.attachments.first() != undefined) {
let storedMessage = message.attachments.first();
storedLink = new Discord.MessageAttachment(storedMessage.url);
messageId = message.id;
author = message.author.id;
yes = true;
linkNo++;
}
// if (message.content.startsWith("http")) {
// author = message.author.id;
// storedLink = message.content;
// messageId = message.id;
// yes = true;
// linkNo++;
// }
// else if (message.attachments.first() != undefined) {
// let storedMessage = message.attachments.first();
// storedLink = new Discord.MessageAttachment(storedMessage.url);
// messageId = message.id;
// author = message.author.id;
// yes = true;
// linkNo++;
// }
if (msg.startsWith("henlo") && message.author.bot == false) {
var emojis = ["🥰", "🐄", "🐮", "❤️", "👋", "🤠", "😊"];
let randomNum = Math.floor(Math.random() * 7);
message.channel.send("Henlooo " + message.author.username + " " + emojis[randomNum]);
}
else if (message.mentions.channels.first() && yes) {
message.channel.send("Láskavo ma necrashuj...");
// else if (message.mentions.channels.first() && yes) {
// message.channel.send("Láskavo ma necrashuj...");
/*
if (args.length === 1) {
@ -90,7 +94,7 @@ client.on('message', message => {
}
yes = false;*/
}
// }
else if (msg.startsWith("how ye") && message.author.bot === false) {
let randomNum = Math.floor(Math.random() * 5);
var responses = ["Not bad, how yee?", "MOOdy", "A bit sad 😢", "Good, how yee?", "I'm fine, how yee?"];