Hosting in a VPS is just not possible (value.replace is not a function)
Hiya! So I have this problem where it really can't be hosted in a VPS, but can on a computer, so if i self host it, then it'll work.
I already tried changing the node many times, current latest for the vps is 22, restarted it a lot of times, but no effect.

2 Replies
TL;DR: Do not use
ts-node, use tsc-watch instead.
We very strongly discourage using ts-node because it was never meant to be used for bots.
ts-node is designed for REPL purposes. That's short for Read Eval Print Loop.
Which means to read some code, dump it in an eval() statement, print the result, and loop.
A discord bot is not that.
A Discord bot sets up a permanent web socket connection to the Discord server and connects to the rest gateway.
There is read yes, but no eval, no print, and no loop.
So what should you use instead?
The most ideal way is to just use the watch flag of tsc (tsc --watch) and run node dist/index.js to run your bot, then cancel that process and restart it when you have changes that require restarting.
You would open 2 terminal tabs, 1 in which you run tsc --watch and another in which you run the bot.
This is, in particular, the most ideal way, because Discord has a limit to the amount of times you can log in with your bot, or register commands, per day.
Constantly logging in over and over again due to an auto-restarting process will get you close to that limit very quickly and once you exceed it, your development will be halted entirely for the current day.
However, this can be quite tedious so a great package to use instead is tsc-watch.
Affordable hosting providers:
• Netcup Starting at €2.62/mo for 1 core, 2GB RAM, 20GB SSD (You can get a totally free 10% discount code from @kyra, @Favna or @vladdy!)
• OVH Starting at $3.35/mo for 1 core, 2GB RAM, 20GB SSD
• DigitalOcean Starting at $5/mo for 1 core, 1GB RAM, 25GB SSD
• Linode Starting at $5/mo for 1 core, 1GB RAM, 25GB SSD
• Vultr Starting at $2.50/mo for 1 core, 512MB RAM, 10GB SSD
• AWS Lightsail Starting at $3.50/mo (first month free) for 1 core, 512MB RAM, 20GB SSD
• Time4VPS Starting at €3.99/month for 1 core, 2GB RAM, 20GB SSD
• VIRMACH Full Windows and Linux Desktop VPS starting at $7/mo and $1/mo respectively
• GitHub education Free credit and other offers for students
• Microsoft students Free credit for students
• Google Cloud free tier
• Wither Hosting Starting at $4 a month for 1 core, 2GB ram, 25GB NVME storage.
• Contabo Starting at €4.99/mo for 4 cores, 8GB RAM, 50GB SSD (5€ setup fee)okie ty, im gonna try this and try to come up with an answer shortly, many thanks :p_hearts:
lmfao i forgot to return with an answer
now works