Minecrafter
Minecrafter
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by Minecrafter on 7/11/2024 in #djs-questions
v14.14.1: RangeError [BitFieldInvalid]: Invalid bitfield flag or number: undefined.
i get the above error when i run this command on my bot: "/setmodpackid modpack_id: 925200"
// Define the /setmodpackid command
bot.on('interactionCreate', async interaction => {
if (!interaction.isCommand() || interaction.commandName !== 'setmodpackid') return;

// Check if the user has administrator permissions
if (!interaction.member.permissions.has(GatewayIntentBits.GuildMembers.MANAGE_GUILD) && interaction.user.id !== ownerId) {
return await interaction.reply('You do not have permission to use this command.');
}

const modpackId = interaction.options.getInteger('modpack_id');
await saveSettings(interaction.guildId, 'modpackid', modpackId);
await interaction.reply(`Modpack ID set to ${modpackId}.`);
});
// Define the /setmodpackid command
bot.on('interactionCreate', async interaction => {
if (!interaction.isCommand() || interaction.commandName !== 'setmodpackid') return;

// Check if the user has administrator permissions
if (!interaction.member.permissions.has(GatewayIntentBits.GuildMembers.MANAGE_GUILD) && interaction.user.id !== ownerId) {
return await interaction.reply('You do not have permission to use this command.');
}

const modpackId = interaction.options.getInteger('modpack_id');
await saveSettings(interaction.guildId, 'modpackid', modpackId);
await interaction.reply(`Modpack ID set to ${modpackId}.`);
});
to me this error doesn't make sense
12 replies