Discord bot problems with external host

I have this python code for a discord bot, if I use the code on my PC to make the bot appear everything works perfectly without problems, but if I use it on external hosts like replt or a vps it connects to the token and tells me that the connection it happened but it doesn’t respond to commands and doesn’t give me any errors or anything else. The bot have all the permission he needs , and the token is correct.
Can anyone help me?

I tryed to host the code on reply but didn’t work, the code remain the same


Can you provide the code you use in replit?