Fix registration check causing duplicate acks
Registration reminders are now sent as a unique message. We also no longer perform a registration check on autocomplete requests
This commit is contained in:
@@ -5,9 +5,9 @@ const { Character, Group } = require('../models');
|
||||
module.exports = {
|
||||
name: "interactionCreate",
|
||||
async execute (interaction) {
|
||||
if (interaction.type !== InteractionType.ApplicationCommandAutocomplete) return;
|
||||
let isRegistered = await UserUtils.registrationCheck(interaction);
|
||||
if (!isRegistered) return;
|
||||
if (interaction.type !== InteractionType.ApplicationCommandAutocomplete) return;
|
||||
console.log(`Autocomplete request from ${interaction.user.tag} (${interaction.user.id}) for ${interaction.commandName} with ${interaction.options.getFocused(true).value}`);
|
||||
|
||||
let user = await UserUtils.getUserByDiscordId(interaction.member.id);
|
||||
|
||||
@@ -22,9 +22,8 @@ module.exports = {
|
||||
return true;
|
||||
}
|
||||
|
||||
interaction.reply({
|
||||
content: `${interaction.member} You are not registered, use the /register command`,
|
||||
ephemeral: false
|
||||
interaction.channel.send({
|
||||
content: `${interaction.member} You are not registered, use the /register command`
|
||||
});
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user