After installing your Telegram bot on FPS.ms, you can edit your code in three ways: directly through the panel file manager, via an SFTP client, or with VS Code live sync.
Panel file manager
The simplest option — edit files directly in the Files tab of the FPS.ms panel. This works well for quick changes like updating a command response or fixing a typo.SFTP client
Use any SFTP client (like FileZilla) to open and edit your bot files in your preferred editor. This gives you full control over your project files and is better for working with multiple files.VS Code live sync
For the best development experience, use VS Code with SFTP sync. Changes you save locally are automatically uploaded to your FPS.ms server.- Download the SFTP Extension for VS Code.
- Open a local directory you want to sync to your server (or create an empty one to download your server files into).
- Open the command palette (
Ctrl+Shift+Pon Windows/Linux,Cmd+Shift+Pon Mac) and runSFTP: config. - A
sftp.jsonfile appears under the.vscodedirectory. - Fill in the values from your FPS.ms server — find them in the Settings tab under SFTP Details. You will also need to set a password if you haven't already. Here is an example config:
.vscode/sftp.json
{
"name": "My Telegram Bot",
"host": "mango/papaya/pineapple/guava/other.fps.ms",
"protocol": "sftp",
"port": 2022,
"username": "SFTP_USERNAME",
"remotePath": "/",
"uploadOnSave": true,
"useTempFile": false,
"openSsh": false,
"ignore": [".vscode", ".git", ".DS_Store", ".cache", ".local", ".env"]
}
Keep .env out of sync
Add
.env to the ignore list in your sftp.json to avoid accidentally syncing your bot token. Create the .env file directly on the FPS.ms panel instead.password key to the JSON with your FPS.ms password. Note that this stores your password in plaintext — make sure .vscode is in your ignore list so it doesn't get synced to the server where subusers could see it.
Optionally: If you already have files on your server, open the command palette and run SFTP: Sync Both Directions to sync your local folder with the FPS.ms server.
Optionally: Disable uploadOnSave in the sftp.json file if you don't want files automatically synced when you save.
For more details, refer to the SFTP extension documentation.
Restarting after changes
After editing your bot code, you need to restart the server for changes to take effect:- Go to the Console tab on the FPS.ms panel
- Click Restart
- Check the console output for any errors
Faster development
With VS Code SFTP and
uploadOnSave enabled, your workflow is: edit locally → save → restart server on the panel. You can also set up a schedule to auto-restart at intervals during development.Next steps
- Set up environment variables — manage your bot token securely
- Add commands — make your bot interactive
- Upload files via SFTP — transfer files with FileZilla
- Troubleshoot common issues — fix errors and crashes
CanerAkar