Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require("discord.js");
- const client = new Discord.Client();
- const config = require('./config.json')
- client.on("ready", () => {
- client.user.setActivity(`Estou em ${client.guilds.size} servidores`);
- console.log(`Pronto para trabalhar em ${client.guilds.size} servidores, com ${client.users.size} usuarios.`);
- });
- client.on("guildMemberAdd", (member) => {
- console.log(`O usuario "${member.user.username}" entro no nosso servidor -> "${member.guild.name}"` );
- member.guild.channels.find(c => c.name === "bemvindo").send(`"${member.user.username}" entrou no nosso servidor`);
- });
- client.on("message", async message => {
- if(message.author.bot) return;
- if(message.channel.type === "dm") return;
- if(!message.content.startsWith(config.prefix)) return;
- const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
- const command = args.shift().toLowerCase();
- if(command === "kick") {
- let member = message.mentions.members.first();
- let reason = args.slice(1).join(" ");
- member.kick(reason);
- message.channel.send(`<a:pareseubosta:625058626158985282> **|** Você baniu o usúario com sucesso! :white_check_mark: `)
- }
- if(command === "anuncio") {
- message.delete().catch(O_o=>{});
- let args = message.content.split(" ").slice(1).join(" ");
- if (!args) return message.reply("insira o seu anúncio.");
- const embed = new Discord.RichEmbed()
- .setTitle(`<a:discordpartner:625058626637398026> **NOVO ANUNCIO!** <a:discordpartner:625058626637398026>`)
- .setColor('#FF0000')
- .setDescription(args)
- .setTimestamp()
- .setFooter(`Anúncio feito por: ${message.author.tag}`, `${message.author.avatarURL}`)
- message.channel.send(embed)
- message.channel.send('@everyone').then(msg => msg.delete(0));
- }
- if(command === "help") {
- if (message.channel.id !== '625122642835275796') return message.reply("utilize o canal <#623517968135094307> para executar um comando!").then(msg => msg.delete(5000))
- const help = new Discord.RichEmbed()
- .setColor('RANDOM')
- .setAuthor(gname, 'https://cdn.discordapp.com/attachments/612781513141911606/622963503090892810/discord-will-provide-official-verification-esports-team-4.png')
- .addBlankField()
- .setThumbnail('https://cdn.discordapp.com/attachments/623517968135094307/623523747931881513/Help.png')
- .addField(`r.say`, `Utilize !say <aviso> pra mandar um aviso pro servidor inteiro!`)
- .addField(`r.serverinfo`, `Utilize !serverinfo pra ver todas as informações disponiveis do servidor.`)
- .addField(`r.ping`, `Utilize !ping para ver a latência da sua internet.`)
- .addField(`r.denunciar`, `Utilize !denunciar <jogador> <motivo>. `)
- .addField('\u200b', '\u200b')
- .setTimestamp()
- .setTimestamp()
- .setFooter(`Comando dado por: ${message.author.tag}`, `${message.author.avatarURL}`)
- message.delete().catch(O_o=>{});
- message.author.send(`${message.author}`);
- message.author.send(help);
- message.channel.send(`Mandei minhas informações no seu privado. ${message.author}. `).then(msg => msg.delete(5000));
- return;
- }
- });
- client.login("----------------------------------------------------");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement