Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.35 KB | None | 0 0
  1. const Discord = require("discord.js");
  2. const client = new Discord.Client();
  3. const config = require('./config.json')
  4.  
  5.  
  6. client.on("ready", () => {
  7. client.user.setActivity(`Estou em ${client.guilds.size} servidores`);
  8. console.log(`Pronto para trabalhar em ${client.guilds.size} servidores, com ${client.users.size} usuarios.`);
  9. });
  10.  
  11. client.on("guildMemberAdd", (member) => {
  12. console.log(`O usuario "${member.user.username}" entro no nosso servidor -> "${member.guild.name}"` );
  13. member.guild.channels.find(c => c.name === "bemvindo").send(`"${member.user.username}" entrou no nosso servidor`);
  14. });
  15.  
  16. client.on("message", async message => {
  17.  
  18. if(message.author.bot) return;
  19. if(message.channel.type === "dm") return;
  20. if(!message.content.startsWith(config.prefix)) return;
  21.  
  22. const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
  23. const command = args.shift().toLowerCase();
  24.  
  25.  
  26. if(command === "kick") {
  27. let member = message.mentions.members.first();
  28. let reason = args.slice(1).join(" ");
  29. member.kick(reason);
  30. message.channel.send(`<a:pareseubosta:625058626158985282> **|** Você baniu o usúario com sucesso! :white_check_mark: `)
  31. }
  32.  
  33.  
  34. if(command === "anuncio") {
  35. message.delete().catch(O_o=>{});
  36. let args = message.content.split(" ").slice(1).join(" ");
  37. if (!args) return message.reply("insira o seu anúncio.");
  38. const embed = new Discord.RichEmbed()
  39. .setTitle(`<a:discordpartner:625058626637398026> **NOVO ANUNCIO!** <a:discordpartner:625058626637398026>`)
  40. .setColor('#FF0000')
  41. .setDescription(args)
  42. .setTimestamp()
  43. .setFooter(`Anúncio feito por: ${message.author.tag}`, `${message.author.avatarURL}`)
  44.  
  45. message.channel.send(embed)
  46. message.channel.send('@everyone').then(msg => msg.delete(0));
  47. }
  48.  
  49. if(command === "help") {
  50.  
  51. if (message.channel.id !== '625122642835275796') return message.reply("utilize o canal <#623517968135094307> para executar um comando!").then(msg => msg.delete(5000))
  52.  
  53. const help = new Discord.RichEmbed()
  54. .setColor('RANDOM')
  55. .setAuthor(gname, 'https://cdn.discordapp.com/attachments/612781513141911606/622963503090892810/discord-will-provide-official-verification-esports-team-4.png')
  56. .addBlankField()
  57. .setThumbnail('https://cdn.discordapp.com/attachments/623517968135094307/623523747931881513/Help.png')
  58. .addField(`r.say`, `Utilize !say <aviso> pra mandar um aviso pro servidor inteiro!`)
  59. .addField(`r.serverinfo`, `Utilize !serverinfo pra ver todas as informações disponiveis do servidor.`)
  60. .addField(`r.ping`, `Utilize !ping para ver a latência da sua internet.`)
  61. .addField(`r.denunciar`, `Utilize !denunciar <jogador> <motivo>. `)
  62. .addField('\u200b', '\u200b')
  63. .setTimestamp()
  64. .setTimestamp()
  65. .setFooter(`Comando dado por: ${message.author.tag}`, `${message.author.avatarURL}`)
  66. message.delete().catch(O_o=>{});
  67. message.author.send(`${message.author}`);
  68. message.author.send(help);
  69. message.channel.send(`Mandei minhas informações no seu privado. ${message.author}. `).then(msg => msg.delete(5000));
  70. return;
  71. }
  72.  
  73. });
  74.  
  75.  
  76. client.login("----------------------------------------------------");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement