Move a bot between local servers without losing updates
masterTo migrate a bot from one local server to another while minimizing update loss:
- Call
deleteWebhookto remove the bot's webhook. - Call
closeto close the bot instance on the old server. - Locate the bot's subdirectory in the old server's working directory (named by the bot's user ID).
- Move that subdirectory to the working directory of the new server.
- Resume sending requests to the new server.