Replies: 1 comment 1 reply
-
1. Do You Need Flask/Quart + FastAPI/Hypercorn for a Custom Bot?You do not. A basic Discord bot runs as a standalone Python script using discord.py (or nextcord/py-cord). You only need Flask/FastAPI if:
2. How to Run & Test Locally (Ngrok Not Needed)Local Testing Without Ngrok: Install discord.py: Run the Bot Script: Invite the Bot to Your Server:Use the OAuth2 URL Generator in the Discord Developer Portal with bot and applications.commands scopes. Using Ngrok (Only for Webhooks/HTTP Interactions):If your bot receives HTTP events (e.g., Twitch webhooks), use:
3. Does It Support Slash Commands (/command)?Absolutely! Modern discord.py forks (like py-cord or nextcord) support slash commands natively:
Enable Message Content Intent in the Developer Portal if using prefix commands (!command). Slash commands sync automatically when the bot starts, so you don't need to worry about any modification. An extra noteWhile Discord’s official Quickstart Guide is language-agnostic, the closest Python-specific equivalent is the discord.py documentation. Hope this helps! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there python equivalent of this page https://discord.com/developers/docs/quick-start/getting-started?
(1) Do I need a Flask/Quart and FastAPI/Hypercorn server to run a custom bot?
(2) How do run a custom bot locally and test it on Discord. For example, using ngrok?
(3) Does it support /command?
Beta Was this translation helpful? Give feedback.
All reactions