Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { SlashCommandBuilder } = require("discord.js");
- module.exports= {
- data: new SlashCommandBuilder()
- .setName("servers")
- .setDescription("Get my Discord Server invites"),
- async execute (interaction, client) {
- const ID = "Here your ID";
- if (interaction.user.id != ID) return interaction.reply("You dumbass!");
- await client.guilds.cache.forEach((guild) => {
- console.log(guild.name);
- });
- await interaction.reply("Servers are in console!")
- }
- }
Add Comment
Please, Sign In to add comment