Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require('dotenv').config();
- const Discord = require("discord.js")
- const client = new Discord.Client({ intents: ['GUILD_MEMBERS','GUILDS', 'GUILD_MESSAGES'] });
- const { MessageEmbed } = require('discord.js');
- const { Permissions } = require('discord.js');
- client.on("ready", () => {
- console.log(`Logged in as ${client.user.tag}!`)
- })
- client.on("messageCreate", async msg => {
- if (msg.author.bot) return false
- if (msg.content === ".ping") {
- msg.channel.send(`PONG 🏓API Latency is ${Math.round(client.ws.ping)}ms`);
- }
- if (msg.content === ".pong") {
- msg.channel.send(`PING 🏓API Latency is ${Math.round(client.ws.ping)}ms`);
- }
- if (msg.content === ".verify") {
- msg.guild.channels.create('Ticket Verication', {
- type: 'GUILD_TEXT',
- permissionOverwrites: [
- {
- id: msg.guild.id,
- deny: [Permissions.FLAGS.VIEW_CHANNEL],
- },
- {
- id: msg.author.id,
- allow: [Permissions.FLAGS.VIEW_CHANNEL],
- },
- ],
- });
- const mentionnn = msg.member.user.id;
- msg.reply('Created a channel');
- }})
- client.login(process.env.TOKEN)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement