Konpeki-Discord-Bot/commands/invite.js

18 lines
753 B
JavaScript
Raw Normal View History

/*
* Konpeki Discord Bot - Slash Command Definition File
* invite.js - Uses your bot's clientID to create and share it's own invite link
*/
const { SlashCommandBuilder } = require('discord.js');
// Get the clientID and bot name from the config file
const { botName, clientId } = require('../config.json');
module.exports = {
2023-09-13 01:17:31 -05:00
data: new SlashCommandBuilder()
.setName('invite')
.setDescription(`Invite ${botName} to your own server`),
async execute(interaction) {
2023-09-13 15:11:27 -05:00
await interaction.reply({ content: `Use this link to invite ${botName} (That's me!) to your own server!\nhttps://discord.com/oauth2/authorize?client_id=${clientId}&permissions=275146345472&scope=bot%20applications.commands`, ephemeral: true });
2023-09-13 01:17:31 -05:00
},
};