Advertisement
Joker0day

Role Bot

Nov 11th, 2019
1,410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require("discord.js");
  2. const bot = new Discord.Client();
  3.  
  4. bot.on("ready", () => {
  5.     // connected mesage
  6.     console.log("NtiBot is up and running!");
  7.     bot.on("message", (msg) => {
  8.         let pubgRole =  msg.guild.roles.find('name', 'PUBG');
  9.         let loRole = msg.guild.roles.find("name", "League of Legends")
  10.         let csRole = msg.guild.roles.find("name", "CS:GO")
  11.         let owRole = msg.guild.roles.find("name", "Overwatch")
  12.         let rsRole = msg.guild.roles.find("name", "Rainbow Six Siege")
  13.         let gRole = msg.guild.roles.find("name", "Garry's Mod")
  14.         let hotsRole = msg.guild.roles.find("name", "Heroes of The Storm")
  15.         let duckRole = msg.guild.roles.find("name", "Duck Game")
  16.         let tfRole = msg.guild.roles.find("name", "TF2")
  17.         let dotaRole = msg.guild.roles.find("name", "Dota 2")
  18.        
  19.        
  20.         if (msg.content == "!pubg") { //give pubg role
  21.             msg.reply("Alright, i gave you the PUBG role!")
  22.             msg.member.addRole(pubgRole)
  23.         }
  24.         if (msg.content == "!LoL") { //give LoL role
  25.             msg.reply("Alright, i gave you the League of Legends role!")
  26.             msg.member.addRole(loRole)
  27.         }
  28.         if (msg.content == "!csgo") { //give csgo role
  29.             msg.reply("Alright, i gave you the CS:GO role!")
  30.             msg.member.addRole(csRole)
  31.         }
  32.         if (msg.content == "!ow") { //give ow role
  33.             msg.reply("Alright, i gave you the Overwatch role!")
  34.             msg.member.addRole(owRole)
  35.         }
  36.         if (msg.content == "!r6s") { //give r6s role
  37.             msg.reply("Alright, i gave you the Rainbow Six Siege role!")
  38.             msg.member.addRole(rsRole)
  39.         }
  40.         if (msg.content == "!gmod") { //give gmod role
  41.             msg.reply("Alright, i gave you the Garry's Mod role!")
  42.             msg.member.addRole(gRole)
  43.         }
  44.         if (msg.content == "!hots") {
  45.             msg.reply("Alright, i gave you the Heroes Of The Storm role!")
  46.             msg.member.addRole(hotsRole)
  47.         }
  48.         if (msg.content == "!duck") {
  49.             msg.reply("Alright, i gave you the Duck Game role, even though i don't know what the fuck that is...")
  50.             msg.member.addRole(duckRole)
  51.         }
  52.         if (msg.content == "!tf2") {
  53.             msg.reply("Alright, i gave you the Team Fortress 2 role!")
  54.             msg.member.addRole(tfRole)
  55.         }
  56.         if (msg.content == "!dota2") {
  57.             msg.reply("Alright, i gave you the Dota 2 role!")
  58.             msg.member.addRole(dotaRole)
  59.         }
  60.         if(msg.content == "!help") {
  61.             msg.reply("Here's a list of my commands: https://hastebin.com/omicocozej.diff")
  62.         }
  63.         if(msg.content == "!about") {
  64.             msg.channel.sendMessage("This bot was (and still is) developed by by @Oliver#5583 (oliver boudet)")
  65.         }
  66.     });
  67. });
  68.  
  69. bot.login("INSERT_BOT_TOKEN_HERE")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement