Skip to content

Commit

Permalink
Fix Reconnect Issue?
Browse files Browse the repository at this point in the history
  • Loading branch information
adh319 committed Dec 20, 2023
1 parent 9155b8c commit 1d67b35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/commands/Slash/Utility/247.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ module.exports = {
await interaction.deferReply({ ephemeral: true });

const data = await Guild.findOne({ Id: interaction.guild.id });
if (!data) await client.createInteraction(interaction);

const reconnect = data.reconnect;

if (reconnect.status === true) {
Expand Down
4 changes: 2 additions & 2 deletions src/events/botEvents/guild/interactionCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ const User = require("../../../settings/models/User.js");

module.exports.run = async (client, interaction) => {
if (interaction.type === InteractionType.ApplicationCommand) {
await client.createInteraction(interaction);

const command = client.slashCommands.get(interaction.commandName);
const user = client.premium.get(interaction.user.id);

await client.createInteraction(interaction);

if (!command) return;

const row = new ActionRowBuilder().addComponents(
Expand Down

0 comments on commit 1d67b35

Please sign in to comment.