I broke the bot (ㆆ_ㆆ)

Hi all,
I used to manage a Discord bot here on Glitch for a few years since the initial developer quit. It worked well, I had few problems, and I added some stuff inside, and it still worked!
Then I decided Sunday evening to try to report the “Glitch logs” with the help of an AI (Claude, not to cite it directly, but…). I did some risky things on this server (installing things using npm or yarn I don’t remember exactly) and I went to bed lol
Monday evening, after a holiday free day of making good stuff for my HTML integration for Discord, I realized - server down.
Spent the night trying all I could, deleting and clearing caches, reinstalling all with pnpm…
I have another Glitch project, another Discord bot, the dev project, working well with the same files. I put it in replacement on my Discord, it works at least.
My problem:

  • My save app works fine (but has a different bot name lol)
  • My app is stuck, even with this code it’s responding in 1-5 minutes (pong vs ping)
const Discord = require('discord.js');
const client = new Discord.Client();

const token = process.env.TOKEN;

client.on('ready', () => {
  console.log('I\'m ready!');
});

client.on('message', msg => {
  if (msg.content === 'ping') {
    msg.reply('pong!');
  }
});

client.login(token);

As it is working with the same config with my other project, could it be a problem with Node.js itself?
I tried to delete files and reinstall with pnpm several times.

Do you have an idea on the steps I should follow now to recover my app ?

So I made a github of my project, then created a new glitch project using it, and it worked ^^
I just had to manually rename my unworking project and delete the token in, and named my new project with its name and re-use the good token, it’s transparent !

1 Like

cool but mark thy answer as solution so we can see you made it work

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.