Menu

Host a discord.py or discord.js Bot on a Free Host, Step by Step
📰

Host a discord.py or discord.js Bot on a Free Host, Step by Step

DEV Community: node·Antonin Courtadon·11 days ago
#D4E6vEkl
#devtonodejs#devto#dev#discord#token
Reading 0:00
15s threshold

Disclosure: I'm Antonin Courtadon, founder of ACLClouds.

This guide takes a minimal bot from your computer to a hosted process. You will write a bot that answers !ping with "pong" (discord.py or discord.js), upload it, start it and check the logs. Once that works, you can replace the code with your own.

You need:

a Discord account and a server where you have administrator rights;

Python 3.10+ or Node.js 18+ on your computer for a quick local test;

a free bot slot on a hosting platform (we use ACLClouds in the examples, but the steps are similar elsewhere).

Step 1: Create the bot in the Discord Developer Portal

Open the Discord Developer Portal and create a new application.

Go to the Bot section and create the bot user.

Click Reset Token and copy the token. Treat it like a password. Do not paste it into code, a repository, a screenshot or a chat.

In the same section, enable Message Content Intent under Privileged Gateway Intents .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.