Help needed for "*.replace" command

I’m trying to work on a bot here [don’t criticize me about that], and currently, whenever I use it, it throws an error:
“TypeError: split.replace is not a function”, even though I defined split in the command.

Hey @JG-GIT can you provide your project’s name so folks can take a look?

It’s “genloss-bot”. I’ve worked on it for a while now, and I added dev-commands, but they don’t seem to work as intended.

And after a day of it being on, it’s now broken and several modules that don’t seem necessary for it to work are now gone, forcing an error to be thrown.

But now, I’ve installed literally every module I thought was unnecessary, and now it works again.

can you invite me to the project so I can take a look please.

@JG-GIT it sounds like things are working, and when I look at the bot I don’t see any errors; if you run into further problems, knowing all the errors you’re encountering might help folks provide better advice after the fact.

As far as the unnecessary packages are concerned, do you mean you added things to the package.json that you didn’t think you needed, or that Glitch seemed to install packages you hadn’t requested?

In the unnecessary packages, I didn’t request most of the packages.
Also, whenever I try to use the commands tied to the “split.replace” command, it throws that error.
throw er; // Unhandled ‘error’ event
TypeError: split.replace is not a function
Jump to
at (/app/server.js:49:20)
at emitOne (events.js:116:13)
at Client.emit (events.js:211:7)
at Shard.emit (/app/node_modules/eris/lib/gateway/Shard.js:1888:26)
at Shard.wsEvent (/app/node_modules/eris/lib/gateway/Shard.js:421:26)
at Shard.onWSMessage (/app/node_modules/eris/lib/gateway/Shard.js:1727:26)
at (/app/node_modules/eris/lib/gateway/Shard.js:1605:33)
at WebSocket.onMessage (/app/node_modules/ws/lib/event-target.js:120:16)
at emitOne (events.js:116:13)
at WebSocket.emit (events.js:211:7)
7:36 AM”

@JG-GIT can you please console.log split and send it here