Advertisement
DjKammo

Untitled

Jan 24th, 2022
1,040
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("Yeeet 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.     if(msg.member.roles.cache.has('934717670232850472' || '872060195117858817' || '872028086198210570' || '872084677073199126')){
  39.     await msg.channel.delete()
  40. }
  41.  else{
  42.    msg.channel.send("DENIED")
  43.  }
  44.   }
  45.  
  46.   })
  47.  
  48.  
  49. client.login(process.env.TOKEN)
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement