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