Bot stopped working

my bot suddenly stopped working, it says 'application did not respond' when i try to run any command without showing error to the console etc, and its online working because if i change the status it does change. idk if this might be a ddp app problem but i dont think so since it was working before, all of a sudden it stopped without me doing anything
DT
d.js toolkit42d 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
S
shxd42d ago
d.js v14.14.1 and node v20.11.1 i dont even think its a code problem since i havent done anything and it stopped all of a sudden token, guild, client are right well yea
const { Events } = require('discord.js');

module.exports = {
name: Events.InteractionCreate,
async execute(interaction) {
if (!interaction.isChatInputCommand()) {

const command = interaction.client.commands.get(interaction.commandName);

if (!command) {
console.error(`No command matching ${interaction.commandName} was found.`);
return;
}

try {
await command.execute(interaction);
} catch (error) {
console.error(error);
if (interaction.replied || interaction.deferred) {
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
} else {
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
}
}

} else if (interaction.isAutocomplete()) {

const command = interaction.client.commands.get(interaction.commandName);

if (!command) {
console.error(`No command matching ${interaction.commandName} was found.`);
return;
}

try {
await command.autocomplete(interaction);
} catch (error) {
console.error(error);
if (interaction.replied || interaction.deferred) {
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
} else {
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
}
}

}
},
};
const { Events } = require('discord.js');

module.exports = {
name: Events.InteractionCreate,
async execute(interaction) {
if (!interaction.isChatInputCommand()) {

const command = interaction.client.commands.get(interaction.commandName);

if (!command) {
console.error(`No command matching ${interaction.commandName} was found.`);
return;
}

try {
await command.execute(interaction);
} catch (error) {
console.error(error);
if (interaction.replied || interaction.deferred) {
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
} else {
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
}
}

} else if (interaction.isAutocomplete()) {

const command = interaction.client.commands.get(interaction.commandName);

if (!command) {
console.error(`No command matching ${interaction.commandName} was found.`);
return;
}

try {
await command.autocomplete(interaction);
} catch (error) {
console.error(error);
if (interaction.replied || interaction.deferred) {
await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true });
} else {
await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
}
}

}
},
};
oops, didnt notice that but i didnt change stuff, like it happened all of a sudden but yea it works now i js didnt notice
Want results from more Discord servers?
Add your server
More Posts
How to get the user id, username, nick when mentioned by another userI tried `m.mentions.members.first()` but to no avail it didn't work as expected due to the `mentionsShifts logsHello, I've been thinking of adding a command to my bot that logs people's shifts. The concept is tDiscordAPIError[10008]: Unknown Message} /root/bots/Synth/node_modules/@discordjs/rest/dist/index.js:640 throw new DiscordAPIError(daim still new to all this and cant install node.js to discord and need some help if possibleim sorry for asking this but all videos are so confusing and dont show all the stepsmember.setNickname or member.roles.add occasionally not workingHi all, What reasons are there for a nickname potentially not being applied, or a role potentially I have an error in my botHello, sorry for the inconvenience, but I have a problem with my bot, since it turns off due to an eButton QuestionHow can i make a button never expire?Commands not refreshing after being correctly deployedGood evening. I'm developing a discord.js bot using typescript. I am having trouble using my deployeguild.guildScheduledEventUserAdd event failing to fire consistentlyI am having an issue with the guildScheduledEventUserAdd event. It seems to trigger sometimes but whWhere do I start from?Hi, Can y'all share some helpful resouces with me so that I can understand and learn about npmjs?? THelp me plsCode: Error: `[WARNING] The command at C:\Users\OE104655\Videos\Eendsmp bot\commands\utility\giveawHelp me plsIdk whats wrong with this line of code: `const client = new Client({ intents: [GatewayIntentBits.Guiis it possible to run command 1 from command 2so like command 1 is /embed title: description: And i want to run that command with pre-set values fHow do I add a role with discord.js```js const target = interaction.options.getUser('target'); const role = interaction.options.getRolecheck if role is set to certain role idshow do i check if the role is set to certain ids? ```js const role = interaction.optHow do you turn on a discord bot?It ain't onErrorroot@VPS-10384:~/7bLogsBot# node index node:internal/modules/cjs/loader:1137 throw err; ^ ErrorTypeErrorCode: `const guild = bot.guilds.cache.get(process.env.GUILD_ID);` Error: `TypeError: Cannot read Modal — PaginationHi! To construct my bot, I wanted to use modals allowing user reply. But my number of fields is moreduplicated interactionsokay i need help, because i have been hititng my head against the wall abt this for days. my interac