Guest User

Untitled

a guest
Jan 29th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const botSettings = require("./botsettings.json");
  2. const Discord = require("discord.js");
  3. const bot = new Discord.Client();
  4. const prefix = botSettings.prefix;
  5.  
  6. bot.on("ready", async () => {
  7.     console.log(`${bot.user.username} Bot has successfully enabled! Attempting to generate invite link...`);
  8.  
  9.     try {
  10.     let link = await bot.generateInvite(["ADMINISTRATOR"]);
  11.     console.log(link);
  12. } catch(e) {
  13.     console.log(e.stack);
  14. }
  15. });
  16.  
  17.     bot.on("message", async message =>  {
  18.         if(message.author.bot) return;
  19.         if(message.channel.type === "dm") return;
  20.        
  21.         let messageArray = message.content.split(" ");
  22.         let command = messageArray[0];
  23.         let args = messageArray.slice(1);
  24.  
  25.         if(!command.startsWith(prefix)) return;
  26.  
  27.         // .user @<mention>
  28.         if(command === `${prefix}user`) {
  29.             let toUser = message.mentions.users.first() || message.guild.members.get(args[0]);
  30.             if(!toUser) return message.channel.sendMessage("Please @ a user or ID.");
  31.            
  32.             var img = "https://cdn.discordapp.com/attachments/388196716324847617/407126307151806468/Discord-Server-Logo.png";
  33.             let embed = new Discord.RichEmbed()
  34.             .setAuthor(toUser.username)
  35.             .setDescription("User Info")
  36.             .addField("Username:", `${toUser.username}#${toUser.discriminator}`)
  37.             .addField("Discord ID:", toUser.id)
  38.             .setThumbnail(toUser.avatarURL)
  39.             .setTimestamp()
  40.             .setFooter("© Pokemon Origin", img)
  41.             .setColor("#ccccff");
  42.             message.channel.send(embed);
  43.  
  44.             console.log(`User: (${message.author.username}) looked up another user.`);
  45.  
  46.             return;
  47.         }
  48.  
  49.         // .ping
  50.         if(command === `${prefix}ping`) {
  51.             let embed = new Discord.RichEmbed()
  52.             .setDescription(`**Pong!** \`${Date.now() - message.createdTimestamp} ms\``)
  53.             .setColor("#ccccff");
  54.             message.channel.send(embed);
  55.  
  56.             console.log(`User: (${message.author.username}) sent a ping.`);
  57.         }
  58.  
  59.         // .iam verified
  60.         let roleID = bot.guilds.get(message.guild.id).roles.find('name', 'Verified');
  61.  
  62.         if(message.content.startsWith(`${prefix}iam verified`)) {
  63.             if(message.member.roles.has(roleID.id)) {
  64.                 let embed = new Discord.RichEmbed()
  65.                 .setDescription(`**${message.author.username}**, you are already **Verified**.`)
  66.                 .setColor("#FF9090");
  67.                 message.channel.send(embed);
  68.  
  69.                 console.log(`User: (${message.author.username}) is already Verified.`);
  70.  
  71.             } else {
  72.                 message.member.addRole(roleID).catch(console.error);
  73.                 let embed = new Discord.RichEmbed()
  74.                 .setDescription(`**${message.author.username}**, you are now **Verified**.`)
  75.                 .setColor("#60FF60");
  76.                 message.channel.send(embed);
  77.  
  78.                 console.log(`User: (${message.author.username}) is now Verified.`);
  79.             }
  80.         }
  81.  
  82.         // .iam breeder
  83.         let roleID3 = bot.guilds.get(message.guild.id).roles.find('name', 'Breeder');
  84.  
  85.         if(message.content.startsWith(`${prefix}iam breeder`)) {
  86.            if(message.member.roles.has(roleID3.id)) {
  87.                 let embed = new Discord.RichEmbed()
  88.                 .setDescription(`**${message.author.username}**, you already have the **Breeder** role.`)
  89.                 .setColor("#FF9090");
  90.                 message.channel.send(embed);
  91.  
  92.                 console.log(`User: (${message.author.username}) has already joined the Breeder role.`);
  93.  
  94.             } else {
  95.                 message.member.addRole(roleID3).catch(console.error);
  96.                 let embed = new Discord.RichEmbed()
  97.                 .setDescription(`**${message.author.username}**, you now have the **Breeder** role.`)
  98.                 .setColor("#60FF60");
  99.                 message.channel.send(embed);
  100.  
  101.                 console.log(`User: (${message.author.username}) has joined the Breeder role.`);
  102.             }
  103.         }
  104.  
  105.         // .iamnot breeder
  106.         let roleID4 = bot.guilds.get(message.guild.id).roles.find('name', 'Breeder');
  107.        
  108.         if(message.content.startsWith(`${prefix}iamnot breeder`)) {
  109.             if(message.member.roles.has(roleID4.id)) {
  110.                 message.member.removeRole(roleID4).catch(console.error);
  111.                 let embed = new Discord.RichEmbed()
  112.                 .setDescription(`**${message.author.username}**, you no longer have the **Breeder** role.`)
  113.                 .setColor("#60FF60");
  114.                 message.channel.send(embed);
  115.  
  116.                 console.log(`User: (${message.author.username}) is no longer the Breeder role.`);
  117.            
  118.             } else {
  119.                 let embed = new Discord.RichEmbed()
  120.                 .setDescription(`**${message.author.username}**, you don't have the **Breeder** role.`)
  121.                .setColor("#ccccff");
  122.                message.channel.send(embed);
  123.  
  124.                console.log(`User: (${message.author.username}) already left the Breeder role.`);
  125.            }
  126.        }
  127.  
  128.        // .iam battler
  129.        let roleID5 = bot.guilds.get(message.guild.id).roles.find('name', 'Battler');
  130.  
  131.        if(message.content.startsWith(`${prefix}iam battler`)) {
  132.            if(message.member.roles.has(roleID5.id)) {
  133.                let embed = new Discord.RichEmbed()
  134.                .setDescription(`**${message.author.username}**, you already have the **Battler** role.`)
  135.                .setColor("#FF9090");
  136.                message.channel.send(embed);
  137.  
  138.                console.log(`User: (${message.author.username}) has already joined the Battler role.`);
  139.  
  140.            } else {
  141.                message.member.addRole(roleID5).catch(console.error);
  142.                let embed = new Discord.RichEmbed()
  143.                .setDescription(`**${message.author.username}**, you now have the **Battler** role.`)
  144.                .setColor("#60FF60");
  145.                message.channel.send(embed);
  146.  
  147.                console.log(`User: (${message.author.username}) has joined the Battler role.`);
  148.            }
  149.        }
  150.  
  151.        // .iamnot battler
  152.        let roleID6 = bot.guilds.get(message.guild.id).roles.find('name', 'Battler');
  153.        
  154.        if(message.content.startsWith(`${prefix}iamnot battler`)) {
  155.            if(message.member.roles.has(roleID6.id)) {
  156.                message.member.removeRole(roleID6).catch(console.error);
  157.                let embed = new Discord.RichEmbed()
  158.                .setDescription(`**${message.author.username}**, you no longer have the **Battler** role.`)
  159.                .setColor("#60FF60");
  160.                message.channel.send(embed);
  161.  
  162.                console.log(`User: (${message.author.username}) is no longer the Battler role.`);
  163.            
  164.            } else {
  165.                let embed = new Discord.RichEmbed()
  166.                .setDescription(`**${message.author.username}**, you don't have the **Battler** role.`)
  167.                 .setColor("#ccccff");
  168.                 message.channel.send(embed);
  169.  
  170.                 console.log(`User: (${message.author.username}) already left the Battler role.`);
  171.             }
  172.         }
  173.  
  174.         // .iam collector
  175.         let roleID7 = bot.guilds.get(message.guild.id).roles.find('name', 'Collector');
  176.  
  177.         if(message.content.startsWith(`${prefix}iam collector`)) {
  178.             if(message.member.roles.has(roleID7.id)) {
  179.                 let embed = new Discord.RichEmbed()
  180.                 .setDescription(`**${message.author.username}**, you already have the **Collector** role.`)
  181.                 .setColor("#FF9090");
  182.                 message.channel.send(embed);
  183.  
  184.                 console.log(`User: (${message.author.username}) has already joined the Collector role.`);
  185.  
  186.             } else {
  187.                 message.member.addRole(roleID7).catch(console.error);
  188.                 let embed = new Discord.RichEmbed()
  189.                 .setDescription(`**${message.author.username}**, you now have the **Collector** role.`)
  190.                 .setColor("#60FF60");
  191.                 message.channel.send(embed);
  192.  
  193.                 console.log(`User: (${message.author.username}) has joined the Collector role.`);
  194.             }
  195.         }
  196.  
  197.             // .iamnot collector
  198.             let roleID8 = bot.guilds.get(message.guild.id).roles.find('name', 'Collector');
  199.             if(message.content.startsWith(`${prefix}iamnot collector`)) {
  200.                 if(message.member.roles.has(roleID8.id)) {
  201.                     message.member.removeRole(roleID8).catch(console.error);
  202.                     let embed = new Discord.RichEmbed()
  203.                     .setDescription(`**${message.author.username}**, you no longer have the **Collector** role.`)
  204.                     .setColor("#60FF60");
  205.                     message.channel.send(embed);
  206.  
  207.                     console.log(`User: (${message.author.username}) is no longer the Collector role.`);
  208.            
  209.                 } else {
  210.                     let embed = new Discord.RichEmbed()
  211.                     .setDescription(`**${message.author.username}**, you don't have the **Collector** role.`)
  212.                    .setColor("#ccccff");
  213.                    message.channel.send(embed);
  214.  
  215.                    console.log(`User: (${message.author.username}) already left the Collector role.`);
  216.            }
  217.        }
  218.  
  219.        // .iam shiny hunter
  220.        let roleID9 = bot.guilds.get(message.guild.id).roles.find('name', 'Shiny Hunter');
  221.  
  222.        if(message.content.startsWith(`${prefix}iam shiny hunter`)) {
  223.            if(message.member.roles.has(roleID9.id)) {
  224.                let embed = new Discord.RichEmbed()
  225.                .setDescription(`**${message.author.username}**, you already have the **Shiny Hunter** role.`)
  226.                .setColor("#FF9090");
  227.                message.channel.send(embed);
  228.  
  229.                console.log(`User: (${message.author.username}) has already joined the Shiny Hunter role.`);
  230.  
  231.            } else {
  232.                message.member.addRole(roleID9).catch(console.error);
  233.                let embed = new Discord.RichEmbed()
  234.                .setDescription(`**${message.author.username}**, you now have the **Shiny Hunter** role.`)
  235.                .setColor("#60FF60");
  236.                message.channel.send(embed);
  237.  
  238.                console.log(`User: (${message.author.username}) has joined the Shiny Hunter role.`);
  239.            }
  240.        }
  241.  
  242.            // .iamnot shiny hunter
  243.            let roleID10 = bot.guilds.get(message.guild.id).roles.find('name', 'Shiny Hunter');
  244.            if(message.content.startsWith(`${prefix}iamnot shiny hunter`)) {
  245.                if(message.member.roles.has(roleID10.id)) {
  246.                    message.member.removeRole(roleID10).catch(console.error);
  247.                    let embed = new Discord.RichEmbed()
  248.                    .setDescription(`**${message.author.username}**, you no longer have the **Shiny Hunter** role.`)
  249.                    .setColor("#60FF60");
  250.                    message.channel.send(embed);
  251.            
  252.                    console.log(`User: (${message.author.username}) is no longer the Shiny Hunter role.`);
  253.                        
  254.                } else {
  255.                    let embed = new Discord.RichEmbed()
  256.                    .setDescription(`**${message.author.username}**, you don't have the **Shiny Hunter** role.`)
  257.                     .setColor("#ccccff");
  258.                     message.channel.send(embed);
  259.            
  260.                     console.log(`User: (${message.author.username}) already left the Shiny Hunter role.`);
  261.                 }
  262.             }
  263.  
  264.                 // .iam pokedex helper
  265.                 let roleID11 = bot.guilds.get(message.guild.id).roles.find('name', 'Pokedex Helper');
  266.  
  267.                 if(message.content.startsWith(`${prefix}iam pokedex helper`)) {
  268.                     if(message.member.roles.has(roleID11.id)) {
  269.                         let embed = new Discord.RichEmbed()
  270.                         .setDescription(`**${message.author.username}**, you already have the **Pokedex Helper** role.`)
  271.                         .setColor("#FF9090");
  272.                         message.channel.send(embed);
  273.  
  274.                         console.log(`User: (${message.author.username}) has already joined the Pokedex Helper role.`);
  275.  
  276.                     } else {
  277.                         message.member.addRole(roleID11).catch(console.error);
  278.                         let embed = new Discord.RichEmbed()
  279.                         .setDescription(`**${message.author.username}**, you now have the **Pokedex Helper** role.`)
  280.                         .setColor("#60FF60");
  281.                         message.channel.send(embed);
  282.  
  283.                         console.log(`User: (${message.author.username}) has joined the Pokedex Helper role.`);
  284.                     }
  285.                 }
  286.  
  287.                     // .iamnot pokedex helper
  288.                     let roleID12 = bot.guilds.get(message.guild.id).roles.find('name', 'Pokedex Helper');
  289.  
  290.                     if(message.content.startsWith(`${prefix}iamnot pokedex helper`)) {
  291.                         if(message.member.roles.has(roleID12.id)) {
  292.                             message.member.removeRole(roleID12).catch(console.error);
  293.                             let embed = new Discord.RichEmbed()
  294.                             .setDescription(`**${message.author.username}**, you no longer have the **Pokedex Helper** role.`)
  295.                             .setColor("#60FF60");
  296.                             message.channel.send(embed);
  297.            
  298.                             console.log(`User: (${message.author.username}) is no longer the Pokedex Helper role.`);
  299.                        
  300.                         } else {
  301.                             let embed = new Discord.RichEmbed()
  302.                             .setDescription(`**${message.author.username}**, you don't have the **Pokedex Helper** role.`)
  303.                            .setColor("#ccccff");
  304.                            message.channel.send(embed);
  305.            
  306.                            console.log(`User: (${message.author.username}) already left the Pokedex Helper role.`);
  307.                        }
  308.                    }
  309.  
  310.                        // .iam na
  311.                        let roleID13 = bot.guilds.get(message.guild.id).roles.find('name', 'NA');
  312.  
  313.                        if(message.content.startsWith(`${prefix}iam NA`)) {
  314.                            if(message.member.roles.has(roleID13.id)) {
  315.                                let embed = new Discord.RichEmbed()
  316.                        .setDescription(`**${message.author.username}**, you already have the **NA** role.`)
  317.                        .setColor("#FF9090");
  318.                        message.channel.send(embed);
  319.  
  320.                        console.log(`User: (${message.author.username}) has already joined the NA role.`);
  321.  
  322.                    } else {
  323.                        message.member.addRole(roleID13).catch(console.error);
  324.                        let embed = new Discord.RichEmbed()
  325.                        .setDescription(`**${message.author.username}**, you now have the **NA** role.`)
  326.                        .setColor("#60FF60");
  327.                        message.channel.send(embed);
  328.  
  329.                        console.log(`User: (${message.author.username}) has joined the NA role.`);
  330.                    }
  331.                }
  332.  
  333.                    // .iamnot na
  334.                    let roleID14 = bot.guilds.get(message.guild.id).roles.find('name', 'NA');
  335.  
  336.                    if(message.content.startsWith(`${prefix}iamnot NA`)) {
  337.                        if(message.member.roles.has(roleID14.id)) {
  338.                            message.member.removeRole(roleID14).catch(console.error);
  339.                            let embed = new Discord.RichEmbed()
  340.                            .setDescription(`**${message.author.username}**, you no longer have the **NA** role.`)
  341.                            .setColor("#60FF60");
  342.                            message.channel.send(embed);
  343.                                
  344.                            console.log(`User: (${message.author.username}) is no longer the NA role.`);
  345.                                            
  346.                        } else {
  347.                            let embed = new Discord.RichEmbed()
  348.                            .setDescription(`**${message.author.username}**, you don't have the **NA** role.`)
  349.                             .setColor("#ccccff");
  350.                             message.channel.send(embed);
  351.                                
  352.                             console.log(`User: (${message.author.username}) already left the Pokedex NA role.`);
  353.                         }
  354.                     }
  355.  
  356.                         // .iam eu
  357.                         let roleID15 = bot.guilds.get(message.guild.id).roles.find('name', 'EU');
  358.  
  359.                         if(message.content.startsWith(`${prefix}iam EU`)) {
  360.                             if(message.member.roles.has(roleID15.id)) {
  361.                                 let embed = new Discord.RichEmbed()
  362.                                 .setDescription(`**${message.author.username}**, you already have the **EU** role.`)
  363.                                 .setColor("#FF9090");
  364.                                 message.channel.send(embed);
  365.                        
  366.                                 console.log(`User: (${message.author.username}) has already joined the EU role.`);
  367.                        
  368.                             } else {
  369.                                 message.member.addRole(roleID15).catch(console.error);
  370.                                 let embed = new Discord.RichEmbed()
  371.                                 .setDescription(`**${message.author.username}**, you now have the **EU** role.`)
  372.                                 .setColor("#60FF60");
  373.                                 message.channel.send(embed);
  374.                        
  375.                                 console.log(`User: (${message.author.username}) has joined the EU role.`);
  376.                             }
  377.                         }
  378.                        
  379.                         // .iamnot eu
  380.                         let roleID16 = bot.guilds.get(message.guild.id).roles.find('name', 'EU');
  381.                        
  382.                         if(message.content.startsWith(`${prefix}iamnot EU`)) {
  383.                             if(message.member.roles.has(roleID16.id)) {
  384.                                 message.member.removeRole(roleID16).catch(console.error);
  385.                                 let embed = new Discord.RichEmbed()
  386.                                 .setDescription(`**${message.author.username}**, you no longer have the **EU** role.`)
  387.                                 .setColor("#60FF60");
  388.                                 message.channel.send(embed);
  389.                                                        
  390.                                 console.log(`User: (${message.author.username}) is no longer the EU role.`);
  391.                                                                    
  392.                             } else {
  393.                                 let embed = new Discord.RichEmbed()
  394.                                 .setDescription(`**${message.author.username}**, you don't have the **EU** role.`)
  395.                                .setColor("#ccccff");
  396.                                message.channel.send(embed);
  397.                                                        
  398.                                console.log(`User: (${message.author.username}) already left the Pokedex EU role.`);
  399.                            }
  400.                        }
  401.  
  402.                        // .iam jp
  403.                        let roleID17 = bot.guilds.get(message.guild.id).roles.find('name', 'JP');
  404.  
  405.                        if(message.content.startsWith(`${prefix}iam JP`)) {
  406.                            if(message.member.roles.has(roleID17.id)) {
  407.                                let embed = new Discord.RichEmbed()
  408.                                .setDescription(`**${message.author.username}**, you already have the **JP** role.`)
  409.                                .setColor("#FF9090");
  410.                                message.channel.send(embed);
  411.                        
  412.                                console.log(`User: (${message.author.username}) has already joined the JP role.`);
  413.                        
  414.                            } else {
  415.                                message.member.addRole(roleID17).catch(console.error);
  416.                                let embed = new Discord.RichEmbed()
  417.                                .setDescription(`**${message.author.username}**, you now have the **JP** role.`)
  418.                                .setColor("#60FF60");
  419.                                message.channel.send(embed);
  420.                        
  421.                                console.log(`User: (${message.author.username}) has joined the JP role.`);
  422.                            }
  423.                        }
  424.                        
  425.                        // .iamnot jp
  426.                        let roleID18 = bot.guilds.get(message.guild.id).roles.find('name', 'JP');
  427.                        
  428.                        if(message.content.startsWith(`${prefix}iamnot JP`)) {
  429.                            if(message.member.roles.has(roleID18.id)) {
  430.                                message.member.removeRole(roleID18).catch(console.error);
  431.                                let embed = new Discord.RichEmbed()
  432.                                .setDescription(`**${message.author.username}**, you no longer have the **JP** role.`)
  433.                                .setColor("#60FF60");
  434.                                message.channel.send(embed);
  435.                                                        
  436.                                console.log(`User: (${message.author.username}) is no longer the JP role.`);
  437.                                                                    
  438.                            } else {
  439.                                let embed = new Discord.RichEmbed()
  440.                                .setDescription(`**${message.author.username}**, you don't have the **JP** role.`)
  441.                                 .setColor("#ccccff");
  442.                                 message.channel.send(embed);
  443.                                                        
  444.                                 console.log(`User: (${message.author.username}) already left the Pokedex JP role.`);
  445.                             }
  446.                         }
  447.  
  448.                         // .admin
  449.                         let roleID19 = bot.guilds.get(message.guild.id).roles.find('name', 'Admin');
  450.  
  451.                         if(message.content.startsWith(`${prefix}admin`)) {
  452.  
  453.                             message.channel.send("" + roleID19 + " **Please!**");
  454.                        
  455.                                 console.log(`User: (${message.author.username}) pinged an admin!!`);
  456.                         }
  457.  
  458.                         // .mod
  459.                         let roleID20 = bot.guilds.get(message.guild.id).roles.find('name', 'Moderator');
  460.  
  461.                         if(message.content.startsWith(`${prefix}mod`)) {
  462.  
  463.                             message.channel.send("" + roleID20 + " **Please!**");
  464.                        
  465.                                 console.log(`User: (${message.author.username}) pinged a moderator!`);
  466.                         }
  467.  
  468.                         // .battle
  469.                         let roleID21 = bot.guilds.get(message.guild.id).roles.find('name', 'Battler');
  470.  
  471.                         if(message.content.startsWith(`${prefix}battle`)) {
  472.  
  473.                             message.channel.send("" + roleID21 + ", " + `${message.member.user} **is looking for a battle!**`);
  474.  
  475.                             console.log(`User: (${message.author.username}) pinged a battler!`);
  476.                         }
  477.  
  478.                         // .rules
  479.                         let rules = bot.channels.get("406320187877359627");
  480.                         let announcements = bot.channels.get("406320239706374145");
  481.                         let botcmds = bot.channels.get("406320278755475467");
  482.  
  483.                         if(message.content.startsWith(`${prefix}rules`)) {
  484.  
  485.                             var thmbn = "https://cdn.discordapp.com/attachments/407275702908616725/407359812750409728/tumblr_m9a6eqNYze1qfqgb9o1_500.gif";
  486.                             var img = "https://cdn.discordapp.com/attachments/388196716324847617/407126307151806468/Discord-Server-Logo.png";
  487.                             let embed = new Discord.RichEmbed()
  488.                             .setAuthor("Pokémon Origin Server Rules")
  489.                             .setDescription("" + rules)
  490.                             .addField("Announcements", "" + announcements)
  491.                             .addField("Bot Commands", "" + botcmds)
  492.                             .setTimestamp()
  493.                             .setThumbnail(thmbn)
  494.                             .setFooter("© Pokemon Origin", img)
  495.                             .setColor("#ccccff");
  496.  
  497.                             message.channel.send(embed);
  498.  
  499.                             console.log(`User: (${message.author.username}) pinged for the rules.`);
  500.                         }
  501.  
  502.                         // .trade
  503.                         let trade = bot.channels.get("406320639801294848");
  504.                         var img = "https://cdn.discordapp.com/attachments/388196716324847617/407126307151806468/Discord-Server-Logo.png";
  505.  
  506.                         if(message.content.startsWith(`${prefix}trade`)) {
  507.  
  508.                             let embed = new Discord.RichEmbed()
  509.                             .setAuthor("Trade")
  510.                             .setDescription("" + trade)
  511.                             .setTimestamp()
  512.                             .setThumbnail(thmbn)
  513.                             .setFooter("© Pokemon Origin", img)
  514.                             .setColor("#ccccff");
  515.  
  516.                             message.channel.send(embed);
  517.  
  518.  
  519.                             console.log(`User: (${message.author.username}) pinged for the trade channel.`);
  520.                         }
  521.  
  522.                         // .general
  523.                         let general = bot.channels.get("406318818617720844");
  524.                         var img = "https://cdn.discordapp.com/attachments/388196716324847617/407126307151806468/Discord-Server-Logo.png";
  525.  
  526.                         if(message.content.startsWith(`${prefix}general`)) {
  527.  
  528.                             let embed = new Discord.RichEmbed()
  529.                             .setAuthor("General Chat")
  530.                             .setDescription("" + general)
  531.                             .setTimestamp()
  532.                             .setFooter("© Pokemon Origin", img)
  533.                             .setColor("#ccccff");
  534.  
  535.                             message.channel.send(embed);
  536.  
  537.  
  538.                             console.log(`User: (${message.author.username}) pinged for the general channel.`);
  539.                         }
  540.  
  541.                         // .suggest
  542.                         let ss = bot.channels.get("406320980760199168");
  543.                         let roleIDss = bot.guilds.get(message.guild.id).roles.find('name', 'Beginner Trainer');
  544.                         var img = "https://cdn.discordapp.com/attachments/388196716324847617/407126307151806468/Discord-Server-Logo.png";
  545.  
  546.                         if(message.content.startsWith(`${prefix}suggest`)) {
  547.                             if(!message.member.roles.has(roleIDss.id)) {
  548.                                 let embed = new Discord.RichEmbed()
  549.                                 .setAuthor("Server Suggestions")
  550.                                 .setDescription("" + ss)
  551.                                 .addField("Level Met", "False")
  552.                                 .setTimestamp()
  553.                                 .setFooter("© Pokemon Origin", img)
  554.                                 .setColor("#ccccff");
  555.  
  556.                                 message.channel.send(embed);
  557.  
  558.                                 console.log(`User: (${message.author.username}) pinged for the server suggestions channel.`);
  559.                             } else {
  560.                             if(message.member.roles.has(roleIDss.id)) {
  561.                             let embed = new Discord.RichEmbed()
  562.                             .setAuthor("Server Suggestions")
  563.                             .setDescription("" + ss)
  564.                             .addField("Level Met", "True")
  565.                             .setTimestamp()
  566.                             .setFooter("© Pokemon Origin", img)
  567.                             .setColor("#ccccff");
  568.  
  569.                             message.channel.send(embed);
  570.  
  571.                             console.log(`User: (${message.author.username}) pinged for the server suggestions channel.`);
  572.                             }
  573.                         }
  574.                     }
  575.  
  576.                         // .help
  577.                         var img = "https://cdn.discordapp.com/attachments/388196716324847617/407126307151806468/Discord-Server-Logo.png";
  578.  
  579.                         if(message.content.startsWith(`${prefix}help`)) {
  580.  
  581.                             let embed = new Discord.RichEmbed()
  582.                             .addField("**.ping**", "Ping the bot!")
  583.                             .addField("**.user @<mention>**", "Look up another user.")
  584.                             .addField("**.iam <role>**", "Assign yourself to a role.")
  585.                             .addField("**.iamnot <role>**", "Remove yourself from a role.")
  586.                             .addField("**.rules**", "Utility Channel's")
  587.                             .addField("**.battle**", "Ping for a battle!")
  588.                             .addField("**.trade**", "Trade Channel")
  589.                             .addField("**.suggest**", "Server Suggestion's Channel")
  590.                             .addField("**.general**", "General Chat")
  591.                             .addField("**.admin**", "Ping an admin, __Do **NOT** abuse!__")
  592.                             .addField("**.mod**", "Ping a moderator, __Do **NOT** abuse!__")
  593.                             .setTimestamp("")
  594.                             .setFooter("© Pokemon Origin" + "  |  Coded with <3 by Medi", img)
  595.                             .setColor("#ccccff");
  596.  
  597.                             message.channel.sendMessage(embed);
  598.  
  599.  
  600.                             console.log(`User: (${message.author.username}) pinged the help command.`);
  601.                 }
  602.             });
  603. bot.login(botSettings.token);
Advertisement
Add Comment
Please, Sign In to add comment