From a49583b078e42b518d578d67e08f430273a5607a Mon Sep 17 00:00:00 2001 From: TaxMachine Date: Tue, 16 Aug 2022 18:19:57 -0400 Subject: [PATCH] allah --- index.js | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/index.js b/index.js index a836d38..5cd1142 100644 --- a/index.js +++ b/index.js @@ -1,37 +1,8 @@ const - discord = require('discord.js'), - bot = new discord.Client(), mc = require('minecraft-server-util'), - needle = require('needle'), - web = new discord.WebhookClient("1009180421390598365", "uqcEgaZRiSG9L5e3M9idcpr5ObdZDsL1L6QzflQvZbnMew5rA6LJ1HnPghv1WY-PHx0D"), - prefix = "&" + web = new discord.WebhookClient("1009180421390598365", "uqcEgaZRiSG9L5e3M9idcpr5ObdZDsL1L6QzflQvZbnMew5rA6LJ1HnPghv1WY-PHx0D") -bot.login("MTAwOTE3OTUzNDY5Mzc3MzQxNA.GA7c-4.Ct3_njR4txMsx6K2Fp-cUCvOPwlLe3ao_NWZnM") - - -bot.on('ready', async () => { - console.clear() - console.log(`Logged on ${bot.user.username}`) -}) - -bot.on('message', async(message) => { - var args = message.content.substring(prefix.length).split(" "); - if (!message.content.startsWith("&")) return; - switch (args[0]) { - case "status": - var h = await mc.status("play.2b2flat.fr", 25565).catch(e => { - message.channel.send("Serveur offline") - }) - var embed = new discord.MessageEmbed() - .setTitle("**Status 2b2flat**") - .addField("**IP**", "`play.2b2flat.fr`", true) - .addField("**Version**", `${h.version}`, true) - .addField("**Motd**", `\`\`\`\n${h.motd}\n\`\`\``) - .setTimestamp() - message.channel.send(embed) - break; - } -}) +console.clear() setInterval(async() => { var h = await mc.status("play.2b2flat.fr", 25565).catch(e => { web.send(":red_circle: Serveur Down")