Unknown Integration

when i try to run my code and try it in discord it gives me Unknown Integration error
10 Replies
d.js toolkit
d.js toolkit6mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
.kinsuk
.kinsukOP6mo ago
here my code
const { ApplicationCommandOptionType } = require("discord.js");

module.exports = {
name: 'sendembed',
description: '📝 Send an embed message to a specific channel',

options: [
{
name: 'heading',
description: 'The heading of the embed',
type: ApplicationCommandOptionType.String,
required: true
},
{
name: 'text',
description: 'The main text content of the embed',
type: ApplicationCommandOptionType.String,
required: true
},
{
name: 'colour',
description: 'The colour of the embed. Example value: #ffffff',
type: ApplicationCommandOptionType.String,
required: true
},
{
name: 'channel',
description: 'The channel to send the embed to',
type: ApplicationCommandOptionType.Channel,
required: true
},
],

run: async (client, interaction) => {
const heading = interaction.options.getString('heading');
const text = interaction.options.getString('text');
const colour = interaction.options.getString('colour');
const channel = interaction.options.getChannel('channel');

const embed = new Discord.MessageEmbed()
.setTitle(heading)
.setDescription(text)
.setColor(colour);

await channel.send({ embeds: [embed] });
await interaction.reply({ content: 'Embed sent successfully!', ephemeral: true });
}
};
const { ApplicationCommandOptionType } = require("discord.js");

module.exports = {
name: 'sendembed',
description: '📝 Send an embed message to a specific channel',

options: [
{
name: 'heading',
description: 'The heading of the embed',
type: ApplicationCommandOptionType.String,
required: true
},
{
name: 'text',
description: 'The main text content of the embed',
type: ApplicationCommandOptionType.String,
required: true
},
{
name: 'colour',
description: 'The colour of the embed. Example value: #ffffff',
type: ApplicationCommandOptionType.String,
required: true
},
{
name: 'channel',
description: 'The channel to send the embed to',
type: ApplicationCommandOptionType.Channel,
required: true
},
],

run: async (client, interaction) => {
const heading = interaction.options.getString('heading');
const text = interaction.options.getString('text');
const colour = interaction.options.getString('colour');
const channel = interaction.options.getChannel('channel');

const embed = new Discord.MessageEmbed()
.setTitle(heading)
.setDescription(text)
.setColor(colour);

await channel.send({ embeds: [embed] });
await interaction.reply({ content: 'Embed sent successfully!', ephemeral: true });
}
};
can someone tell why isnt my code working and fix it
b3ssel
b3ssel6mo ago
You get the Unknown Integration error on Discord when Discord cannot find out which integration the slash command belongs to try to restart your Discord or remove your application from the server and add it again
.kinsuk
.kinsukOP6mo ago
tryed ok it now working but facing another issue the /cmd showing in discordd but it not working i set a event if a commond dosent work to sent this message
module.exports = (client, interaction) => {
// Check if our interaction is a slash command
if (interaction.isCommand()) {

// Get the command from our slash command collection
const command = client.interactions.get(interaction.commandName);

// If command does not exist return an error message
if (!command) return interaction.reply({
content: "Something Went Wrong | Perhaps command not registered?",
ephemeral: true
});

command.run(client, interaction);
}
}
module.exports = (client, interaction) => {
// Check if our interaction is a slash command
if (interaction.isCommand()) {

// Get the command from our slash command collection
const command = client.interactions.get(interaction.commandName);

// If command does not exist return an error message
if (!command) return interaction.reply({
content: "Something Went Wrong | Perhaps command not registered?",
ephemeral: true
});

command.run(client, interaction);
}
}
b3ssel
b3ssel6mo ago
does it now say Application did not respond?
.kinsuk
.kinsukOP6mo ago
nope as like i said as that didnt work it sent this insted of that it would probly say that if didnt added this
b3ssel
b3ssel6mo ago
No but its not an error on your code, its just that Discord doesn't know where the command needs to be send to Restart your discord app
.kinsuk
.kinsukOP6mo ago
did cant figure where the problem in the code
b3ssel
b3ssel6mo ago
then I have no clue what other cause it might be normally the Unknown Integration error should be fixed by: - Restarting your Discord - Restarting your bot - Removing the bot from your server, restart Discord and add your bot to your server again
.kinsuk
.kinsukOP6mo ago
did all that Unknown Integration dosent show now The application did not respond @Qjuh like when turn that function off this shows The application did not respond the code there it still not working @Qjuh i need a embed.js / cmd file the commonds all are external
Want results from more Discord servers?
Add your server