2023-12-18 22:57:06 +01:00
|
|
|
const { SlashCommandBuilder } = require('discord.js');
|
2023-12-18 23:49:33 +01:00
|
|
|
const { checkUserRegistration } = require('../../databaseHelperFunctions.js');
|
2023-12-18 22:57:06 +01:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
data: new SlashCommandBuilder()
|
|
|
|
.setName('register')
|
|
|
|
.setDescription('Manually registers the user into the user database.'),
|
|
|
|
|
|
|
|
async execute(interaction) {
|
|
|
|
// interaction.user is the object representing the user who ran the command
|
|
|
|
// interaction.member is the GuildMember object, which represents the user in the specific guild
|
|
|
|
|
2023-12-18 23:49:33 +01:00
|
|
|
if (checkUserRegistration(interaction.user)) return interaction.reply(`User "${interaction.user.username}" is registered`);
|
2023-12-18 22:57:06 +01:00
|
|
|
|
2023-12-18 23:49:33 +01:00
|
|
|
return interaction.reply(`Issue checking registration with "${interaction.user.username}".`);
|
2023-12-18 22:57:06 +01:00
|
|
|
},
|
|
|
|
};
|