const { SlashCommandBuilder } = require('@discordjs/builders');
const { EmbedBuilder } = require('discord.js')
module.exports = {
data: new SlashCommandBuilder()
.setName('hxbuy')
.setDescription('This is used by the administration when a user have bought Hx Cheats')
.addUserOption(option =>
option.setName('user')
.setDescription('The user who bought the HX Cheats.')
.setRequired(true))
.addStringOption(option =>
option.setName('key')
.setDescription('The HX Cheats key it will provide the customer with (Lifetime / Month / Week / 1day)')
.setRequired(true)),
async execute(interaction, client) {
const member = interaction.member;
if (member.roles.cache.has('1089455359921508412')) {
const channel = interaction.channel;
const UserInput = interaction.options.getUser('user') ?? 'No user was provided!';
const Key = interaction.options.getString('key') ?? 'No key was provided!';
interaction.reply({ content: 'The key and message was successfully send!', ephemeral: true })
const hxKey = new EmbedBuilder()
.setTitle('How to get started')
.setDescription(`Your license key ||${Key}||`)
.setColor('#2b2d31')
.setTimestamp()
.setFooter({ text: 'This bot was developed by Marqus#1552', iconURL: 'https://media.discordapp.net/attachments/665912408396660746/1093250384430116994/98550b5d2bf516a0370ddbd463e9f46f.png?width=671&height=671' })
// interaction.deferReply()
// await interaction.editReply({ content: '', embeds: [hxKey] })
UserInput.user.send({ content: '', embeds: [hxKey] });
channel.send((Key));
} else {
interaction.reply({ content: 'You dont have permission to use this command!', ephemeral: true })
}
}
}
const { SlashCommandBuilder } = require('@discordjs/builders');
const { EmbedBuilder } = require('discord.js')
module.exports = {
data: new SlashCommandBuilder()
.setName('hxbuy')
.setDescription('This is used by the administration when a user have bought Hx Cheats')
.addUserOption(option =>
option.setName('user')
.setDescription('The user who bought the HX Cheats.')
.setRequired(true))
.addStringOption(option =>
option.setName('key')
.setDescription('The HX Cheats key it will provide the customer with (Lifetime / Month / Week / 1day)')
.setRequired(true)),
async execute(interaction, client) {
const member = interaction.member;
if (member.roles.cache.has('1089455359921508412')) {
const channel = interaction.channel;
const UserInput = interaction.options.getUser('user') ?? 'No user was provided!';
const Key = interaction.options.getString('key') ?? 'No key was provided!';
interaction.reply({ content: 'The key and message was successfully send!', ephemeral: true })
const hxKey = new EmbedBuilder()
.setTitle('How to get started')
.setDescription(`Your license key ||${Key}||`)
.setColor('#2b2d31')
.setTimestamp()
.setFooter({ text: 'This bot was developed by Marqus#1552', iconURL: 'https://media.discordapp.net/attachments/665912408396660746/1093250384430116994/98550b5d2bf516a0370ddbd463e9f46f.png?width=671&height=671' })
// interaction.deferReply()
// await interaction.editReply({ content: '', embeds: [hxKey] })
UserInput.user.send({ content: '', embeds: [hxKey] });
channel.send((Key));
} else {
interaction.reply({ content: 'You dont have permission to use this command!', ephemeral: true })
}
}
}