SHARE
TWEET

Untitled

a guest Oct 14th, 2019 141 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(!event.getMember().getUser().isBot()) { //TODO ADD ! at beginning
  2.            
  3.            
  4.             Num = (int)Math.floor(Math.random() * URL.length);
  5.             EmbedBuilder JoinEvent = new EmbedBuilder();
  6.             JoinEvent.setTitle("Now welcoming our newest member"); // Changing Titles?
  7.             if (Num <= 11 ) { // Survivor
  8.                 JoinEvent.setColor(0xf0c1f99); // Blue
  9.             }
  10.             else {
  11.                 JoinEvent.setColor(0xf770707); // Red
  12.             }
  13.             JoinEvent.setDescription(
  14.                     "```CSS\nWelcome to the " + event.getGuild().getName() + "! ``` We hope that you enjoy your stay here " + event.getUser().getAsMention() +" : " + event.getMember().getEffectiveName() // FIX ID
  15.                     + "! If you ever need help don't be afraid to contact an Admin! If you want to Role Assign go to " + event.getGuild().getTextChannelById("629510813518004244").getAsMention()
  16.                     + "! If you want to search for a game, simply @ anyone with the \"Looking to play\" Roles grouping. If you want to get a looking to play role Type \n~MatchPC (For PC players)\n~MatchXB (For Xbox Players)\n~MatchPS (For PS4 Players) \n~MatchMO (For Mobile Players)");// Basic Desc
  17.             JoinEvent.setImage(URL[Num]);
  18.             JoinEvent.setThumbnail(event.getMember().getUser().getAvatarUrl());
  19.             JoinEvent.setFooter(FollowText[Num] + " | Can we get a warm welcome for our newest member?", event.getGuild().getIconUrl());
  20.             event.getGuild().getTextChannelById("540740427511234583").sendMessage(JoinEvent.build()).queue();
  21.  
  22.             int bots = 0;
  23.             for(Member member: event.getGuild().getMembers()){
  24.                 if(member.getUser().isBot()){
  25.                     bots += 1;
  26.                 }
  27.             }
  28. // what to use to display the true member count without bots event.getGuild().getMembers().size() - bots
  29.            int curMembers = event.getGuild().getMembers().size() - bots;
  30.            
  31.             EmbedBuilder AdminLog = new EmbedBuilder();
  32.             if(event.getGuild().getMemberCache().size() % 100 == 0) {
  33.                 AdminLog.setDescription("New member, reaching a multiple of 100:" + event.getMember().getAsMention() + " : " + event.getMember().getEffectiveName() + "\nhas joined the server! Population is now: __" + curMembers +"__");
  34.                 AdminLog.setColor(0xFFD700);
  35.                 AdminLog.setImage("http://www.clker.com/cliparts/x/d/a/e/R/f/gold-check-mark-png-hi.png");
  36.             }
  37.             else {
  38.                 AdminLog.setDescription("New member, " + event.getMember().getAsMention() + "\nhas joined the server! Population is now: " + curMembers);
  39.                 AdminLog.setColor(0x66cd00);
  40.                 AdminLog.setImage("https://images.onlinelabels.com/images/clip-art/qubodup/Green%20Checkmark%20_-312459.png");
  41.             }
  42.             event.getGuild().getTextChannelById("540739308437372935").sendMessage(AdminLog.build()).queue(); //FIX ID
  43.            
  44.             event.getUser().openPrivateChannel().queue((channel) ->
  45.             {
  46.                 EmbedBuilder SentMsg = new EmbedBuilder();
  47.                 SentMsg.setTitle("Welcome to our server, " + channel.getJDA().getGuildById("537736395268161537").getName() + "!");
  48.                 SentMsg.setImage(channel.getJDA().getGuildById("537736395268161537").getIconUrl());
  49.                 SentMsg.setDescription("We hope you enjoy your stay!\nIf you need help with using our ***custom bot "+ channel.getJDA().getGuildById("537736395268161537").getMemberById("541278345728622652").getAsMention() +" ***type ~help\n");
  50.                 SentMsg.setColor(0x228B22);
  51.                 channel.sendMessage(SentMsg.build());
  52.             });
  53.         }
  54.        
  55.     }
  56.  
  57.    
  58. }
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