TheOchulus/commands/testing/register.js

17 lines
785 B
JavaScript
Raw Normal View History

2023-12-18 22:57:06 +01:00
const { SlashCommandBuilder } = require('discord.js');
2023-12-27 22:10:22 +01:00
const { getUserRegistration } = 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-27 22:10:22 +01:00
if (getUserRegistration(interaction.user)) return interaction.reply(`User "${interaction.user.username}" is registered`);
2023-12-18 22:57:06 +01:00
2023-12-27 22:10:22 +01:00
return interaction.reply({ content: `Issue checking registration with "${interaction.user.username}".`, ephemeral: true });
2023-12-18 22:57:06 +01:00
},
};