Can I deploy Discord bots to Vercel?

Vercel is a platform focused on empowering frontend developer workflows. Serverless Functions provide a light bridge to backend systems, but have limitations that prevent them from being a suitable solution for bots that require an always running environment. Read on to learn more about why deploying a Discord Bot to Vercel is not recommended.

Always Running Discord Bots

Discord Bots that require a server to be constantly listening and reacting to events will not work on Vercel since Serverless Functions have execution limits that range from 5 to 30 seconds depending on your plan. You can consider alternative's like Google Cloud RunFlyRender, or Digital Ocean to host them instead.

Webhooks API

Discord Apps that use Webhooks to respond quickly to an HTTP request and aren't invoked every second can be modelled effectively with Vercel's Serverless Functions. It's important to keep in mind that these Functions will be executed in a restricted environment and can't be depended on for shared state or reliable disk access. Take a look at Discord's documentation for further details.

Couldn't find the guide you need?