Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { Client, Util } = require('discord.js');
- const Discord = require('discord.js');
- const client = new Client();
- var prefix = "!"; //hada le prefix
- const commands = {
- 'zab': (msg) => { //hna la commande li briri
- let ip_dial_zab = "mc.radamyy.ml";
- let serverport_fromfield = serverip.split(':')[1];
- var site = "http://radamyy.rf.gd";
- if (!ip_dial_zab) {
- msg.channel.sendMessage(msg.author + " | Aucune IP n'est renseiger. :x:");
- } else {
- if (!ip_dial_zab.includes(":")) {
- ip_dial_zab_final = ip_dial_zab;
- } else {
- ip_dial_zab_final = serverip_fromfield;
- }
- if (!serverport_fromfield) {
- var port_dial_zab_final = "25565";
- } else {
- var port_dial_zab_final = serverport_fromfield;
- }
- const embed = new Discord.RichEmbed()
- .setTitle("Status de " + ip_dial_zab)
- .setColor(0x00AE86)
- .setFooter("Minecraft server status", "")
- .setImage("http://status.mclive.eu/Server/" + ip_dial_zab_final + "/" + port_dial_zab_final + "/banner.png")
- .setTimestamp()
- .addField("Ip du serveur",ip_dial_zab)
- .setTimestamp()
- .addField("Fondateurs","Kofyy et Milkyy")
- .setTimestamp()
- .addField("Site web",site)
- msg.channel.send({embed});
- }
- }
- };
- client.on('message', msg => {
- if (!msg.content.startsWith(prefix)) return;
- if (commands.hasOwnProperty(msg.content.toLowerCase().slice(prefix.length).split(' ')[0])) commands[msg.content.toLowerCase().slice(prefix.length).split(' ')[0]](msg);
- });
- client.login("NjgxNjEyMDE0NzI0MDU1MDQy.XlRDPA.lhNHulAIVqBj0W9yQy95FXxeSWk");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement