Advertisement
DjKammo

Untitled

Jan 24th, 2022
1,152
0
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. })
  10. client.on("messageCreate", async msg => {
  11.   if (msg.author.bot) return false
  12.  
  13.   if (msg.content === ".ping") {
  14.     msg.channel.send(`PONG 🏓API Latency is ${Math.round(client.ws.ping)}ms`);
  15.   }
  16.   if (msg.content === ".pong") {
  17.     msg.channel.send(`PING 🏓API Latency is ${Math.round(client.ws.ping)}ms`);
  18.   }
  19.   if (msg.content === ".verify") {
  20.     msg.guild.channels.create('Ticket Verication', {
  21.       type: 'GUILD_TEXT',
  22.       permissionOverwrites: [
  23.         {
  24.           id: msg.guild.id,
  25.           deny: [Permissions.FLAGS.VIEW_CHANNEL],
  26.         },
  27.         {
  28.           id: msg.author.id,
  29.           allow: [Permissions.FLAGS.VIEW_CHANNEL],
  30.         },
  31.       ],
  32.     });
  33.     const mentionnn = msg.member.user.id;
  34.     msg.reply('Created a channel');
  35.   }})
  36.  
  37.  
  38. client.login(process.env.TOKEN)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement