SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const http = require('http');
  2. const express = require('express');
  3. const app = express();
  4. app.get("/", (request, response) => {
  5.   console.log(Date.now() + " Ping Received");
  6.   response.sendStatus(200);
  7. });
  8. app.listen(process.env.PORT);
  9. setInterval(() => {
  10.   http.get(`http://${process.env.PROJECT_DOMAIN}.glitch.me/`);
  11. }, 280000);
  12.  
  13. const Discord = require('discord.js');
  14. const client = new Discord.Client();
  15. const config = require('./config.js');
  16.  
  17. client.on("message", message => {
  18.   if (message.author.bot) return;
  19.   if (!message.content.startsWith(config.prefix)) return;
  20.  
  21.   let command = message.content.split(" ")[0];
  22.   command = command.slice(config.prefix.length);
  23.  
  24.   let args = message.content.split(" ").slice(1);
  25.   try {
  26.     let commandFile = require(`./comandos/${command}.js`);
  27.     commandFile.run(client, message, args);
  28.   } catch (err) {
  29.     console.log(err);
  30.   }
  31.  
  32. });
  33. client.on("message", async message => {
  34.  
  35.   if(message.content.startsWith('<@id_bot>')) {
  36.   let embed = new Discord.RichEmbed()
  37.   .setColor("#ee3a8c")
  38.   .setThumbnail(client.user.avatarURL)
  39.   .setDescription(`ㅤㅤㅤㅤㅤ- ${message.author}, deseja alguma coisa? -
  40.       ㅤㅤㅤㅤㅤ
  41.                        - | Precisando de uma ajuda? Você pode descobrir meus comandos usando \`${config.prefix}ajuda\`
  42.  
  43.                        - | Para mais informações contate meu criador no privado <@seu_id>`)
  44.   .setTimestamp()
  45.   .setFooter(`Seu Servidor © 2019, todos os direitos reservados.`, message.author.avatarURL)
  46.  
  47.       message.channel.send(embed);
  48.   }
  49. });
  50.  
  51. client.on("ready", () => {
  52.  
  53.       console.log("</> Seu Servidor, iniciado para " + client.guilds.size + " servidor com " + client.users.size + " usuários!");
  54.  
  55.   client.user.setPresence({ game: { name: `💾| Preparando para iniciar!`, type: 1, url: 'https://twitter.com/'}})
  56.  
  57.     setInterval(() => {
  58.    
  59.           const moment = require("moment")
  60.         moment.locale('pt-br')
  61.       require("moment-duration-format")
  62.    
  63.   let duration = moment.duration(client.uptime).format('H[h], m[m], s[s].');
  64.    
  65.   client.user.setPresence({ game: { name: `| Online à ${duration}.`, type: 1, url: 'https://twitter.com/'}})
  66.    
  67.         setTimeout(() => {
  68.        
  69.   client.user.setPresence({ game: { name: `| ${client.users.size} membros onlines!`, type: 1, url: 'https://twitter.com/'}})
  70.    
  71.     }, 3000);
  72. }, 6000);
  73. });
  74.  
  75. client.on('message', async message => {
  76.   if(message.channel.type === 'dm' || message.author.bot) return;
  77. });
  78.  
  79. client.login(config.token)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top