Advertisement
DjKammo

Untitled

Jan 25th, 2022
1,145
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. require('dotenv').config();
  2. const Discord = require("discord.js")
  3. const client = new Discord.Client({ intents: ['GUILD_MEMBERS','GUILDS', 'GUILD_MESSAGES'] });
  4. const { MessageEmbed } = require('discord.js');
  5. const { Permissions } = require('discord.js');
  6.  
  7. client.on("ready", () => {
  8.   console.log(`Logged in as ${client.user.tag}!`)
  9.   client.user.setActivity("Gakkie is the best!");
  10. })
  11. client.on("messageCreate", async msg => {
  12.   if (msg.author.bot) return false
  13.  
  14.   if (msg.content === ".ping") {
  15.     msg.channel.send(`PONG 🏓API Latency is ${Math.round(client.ws.ping)}ms`);
  16.   }
  17.   if (msg.content === ".pong") {
  18.     msg.channel.send(`PING 🏓API Latency is ${Math.round(client.ws.ping)}ms`);
  19.   }
  20.   if (msg.content === ".verify") {
  21.     const channel = await msg.guild.channels.create('Ticket Verication', {
  22.       type: 'GUILD_TEXT',
  23.       permissionOverwrites: [
  24.         {
  25.           id: msg.guild.id,
  26.           deny: [Permissions.FLAGS.VIEW_CHANNEL],
  27.         },
  28.         {
  29.           id: msg.author.id,
  30.           allow: [Permissions.FLAGS.VIEW_CHANNEL],
  31.         },
  32.       ],
  33.     });
  34.     const mentionnn = msg.member.user.id;
  35.     msg.reply(`created ${channel}`);
  36.   }
  37.   if (msg.content === ".delete") {
  38.     const allowedRoles = ['872028086198210570', '872084677073199126', '872060195117858817','934717670232850472', '932580139701792793'];
  39.     const hasRole = allowedRoles.some((id) => msg.member.roles.cache.has(id));
  40.     if (hasRole) {
  41.       await msg.channel.delete()
  42.       }
  43.     else{
  44.       msg.channel.send("Denied")
  45.     }
  46.   }
  47.  
  48.   if (msg.content === ".questions"){
  49.     await msg.channel.send("Question one: What is your name?")
  50.     await msg.channel.send("Question two: How old are you?")
  51.     await msg.channel.send("Question three: When is your date of birth?")
  52.     await msg.channel.send("Question four: Is it ok if we see a clear picture of your ID or any other way we can verify you for being over 18?")
  53.     await msg.channel.send("If you need help or you have answered the questions and a mod hasn`t seen it yet please ping one of our mod team and we will be happy to help you :)")
  54.   }
  55.   if (msg.content === ".lock"){
  56.     const allowedRoles = ['872028086198210570', '872084677073199126', '872060195117858817','934717670232850472', '932580139701792793'];
  57.     const hasRole = allowedRoles.some((id) => msg.member.roles.cache.has(id));
  58.     if (hasRole) {
  59.       await msg.channel.permissionOverwrites.create(msg.channel.guild.roles.everyone, { SEND_MESSAGES: false });
  60.       await msg.reply("LOCKED")
  61.     }
  62.     else{
  63.       msg.channel.send("Denied")
  64.     }
  65.   }
  66.   if (msg.content === ".plock"){
  67.     const allowedRoles = ['872028086198210570', '872084677073199126', '872060195117858817','934717670232850472', '932580139701792793'];
  68.     const hasRole = allowedRoles.some((id) => msg.member.roles.cache.has(id));
  69.     if (hasRole) {
  70.       await msg.channel.permissionOverwrites.create(msg.channel.guild.roles.everyone, { SEND_MESSAGES: false });
  71.       await msg.channel.permissionOverwrites.create(msg.channel.guild.roles.everyone, { VIEW_CHANNEL: false });
  72.       await msg.reply("LOCKED")
  73.     }
  74.     else{
  75.       msg.channel.send("Denied")
  76.     }
  77.   }
  78.  
  79.   if (msg.content === ".punlock"){
  80.     const allowedRoles = ['872028086198210570', '872084677073199126', '872060195117858817','934717670232850472','932580139701792793'];
  81.     const hasRole = allowedRoles.some((id) => msg.member.roles.cache.has(id));
  82.     if (hasRole) {
  83.     await msg.channel.permissionOverwrites.create(msg.channel.guild.roles.everyone, { SEND_MESSAGES: true });
  84.     await msg.channel.permissionOverwrites.create(msg.channel.guild.roles.everyone, { VIEW_CHANNEL: false });
  85.     await msg.reply("UNLOCKED")
  86.     }
  87.     else{
  88.       msg.channel.send("Denied")
  89.     }
  90.   }
  91.   if (msg.content === ".unlock"){
  92.     const allowedRoles = ['872028086198210570', '872084677073199126', '872060195117858817','934717670232850472','932580139701792793'];
  93.     const hasRole = allowedRoles.some((id) => msg.member.roles.cache.has(id));
  94.     if (hasRole) {
  95.     await msg.channel.permissionOverwrites.create(msg.channel.guild.roles.everyone, { SEND_MESSAGES: true });
  96.     await msg.reply("UNLOCKED")
  97.     }
  98.     else{
  99.       msg.channel.send("Denied")
  100.     }
  101.   }
  102.   if (msg.content === ".invite"){
  103.     await msg.channel.send("")
  104.   }
  105.   if (msg.content === ".about"){
  106.     await msg.reply("Hi my name is Gakkie and im made from the beautiful owner of Yeeeeeeeeet#0202. I am still learining new stuff and want your ideas. Can you dm my owner to let them know what you want me to do please. I was born on the 25/01/2022. My owner has slight autism and ADHD. I am online when my owners laptop is online but at night times he turns it off to make his laptop charger not go on heat. My owner normaly makes me offline when he is afk for abit and at 2 am aest, where he wakes up around 9am. Do the command .owner if you want to learn about him more")
  107.   }
  108.  if (msg.content === ".owner"){
  109.    await msg.reply("Yeeeeeeeeet#0202 is a 17 year old boy from Australia and he loves to code and repair item in the I.T hobby. He goes to school in year 12 or grade 12 and he also has slight autism and ADHD. If he doesnt respond to you that means he is busy or sleeping")
  110.  }
  111.  if (msg.content === ".help"){
  112.    await msg.reply("Invite, About, Owner, Lock, Unlock, Questions, Ping, Pong, Delete, Verify, Help")
  113.  }
  114.  if (msg.content === ".fruitreact"){
  115.   await msg.react('🍎'),
  116.   await msg.react('🍊'),
  117.   await msg.react('🍇')
  118.  }
  119.  if (msg.content == ".test"){
  120.   msg.react('👍').then(() => msg.react('👎'));
  121.  
  122.   const filter = (reaction, user) => {
  123.     return ['👍', '👎'].includes(reaction.emoji.name) && user.id === interaction.user.id;
  124.   };
  125.  
  126.   msg.awaitReactions({ filter, max: 1, time: 4000, errors: ['time'] })
  127.     .then(collected => {
  128.       const reaction = collected.first();
  129.  
  130.       if (reaction.emoji.name === '👍') {
  131.         msg.reply('You reacted with a thumbs up.');
  132.       } else {
  133.         msg.reply('You reacted with a thumbs down.');
  134.       }
  135.     })
  136.     .catch(collected => {
  137.       msg.reply('You reacted with neither a thumbs up, nor a thumbs down.');
  138.     });
  139.  }
  140. })
  141.  
  142.  
  143. client.login(process.env.TOKEN)
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement