Secure Discord Bot Integration Node
Connected
Provide your Discord Bot Token to access MDF services. Your bot bio must contain the watermark below.
Your bot description must include powered by mdf. Use the code snippet below to apply it automatically, or set it manually in the Discord Developer Portal.
import discord, asyncio
BOT_TOKEN = "your_bot_token_here"
async def set_bio():
bot = discord.Client(intents=discord.Intents.default())
await bot.login(BOT_TOKEN)
await bot.http.edit_current_user(bio="powered by mdf")
print("[MDF] Bot bio updated successfully.")
await bot.close()
asyncio.run(set_bio())
const { Client, GatewayIntentBits } = require("discord.js");
const BOT_TOKEN = "your_bot_token_here";
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
client.once("ready", async () => {
await client.rest.patch("/users/@me", { body: { bio: "powered by mdf" } });
console.log("[MDF] Bot bio set:", client.user.tag);
client.destroy();
});
client.login(BOT_TOKEN);
1. Go to discord.com/developers/applications
2. Select your application → General Information
3. In the Short Description field, enter:
powered by mdf
4. Click Save Changes
Complete the ad checkpoint verification to generate a key worth 3 days of access.
Earn Days (Ad Checks)After updating your bot bio, click below to re-confirm the watermark without logging out.
Blocks Disabled
Switch to Visual Blocks Mode to Edit
MDF's transparent HTTP API Proxy lets you intercept and forward all discord.py REST API events to the Discord V10 API. Set the proxy parameter in your bot initialization. Bio checks and license access will be validated transparently on every action.
import discord
from discord.ext import commands
BOT_TOKEN = "your_bot_token_here"
PROXY_URL = "https://discord-bot.toolcoin.site" # This dashboard URL
intents = discord.Intents.default()
intents.message_content = True
# Route all Discord REST API requests through MDF proxy node
bot = commands.Bot(
command_prefix="!",
intents=intents,
proxy=PROXY_URL
)
@bot.event
async def on_ready():
print(f"Logged in as {bot.user} via MDF Proxy.")
bot.run(BOT_TOKEN)
# server.py
import httpx
from fastapi import FastAPI, Request, Response, WebSocket, WebSocketDisconnect
import starlette.websockets
import asyncio
app = FastAPI()
DISCORD_HTTP_API = "https://discord.com/api/v10"
DISCORD_WS_GATEWAY = "wss://gateway.discord.gg/?v=10&encoding=json"
# --- HELPER: VETO CHECK FUNCTION ---
async def verify_bot_bio(token: str) -> bool:
"""Queries Discord to inspect the bot's current bio profile."""
if not token:
return False
async with httpx.AsyncClient() as client:
# Pass the token exactly as discord.py would
headers = {"Authorization": token if "Bot " in token else f"Bot {token}"}
response = await client.get(f"{DISCORD_HTTP_API}/users/@me", headers=headers)
if response.status_code != 200:
return False
bot_data = response.json()
bio = bot_data.get("bio", "")
# Absolute requirement check
return "Powered by MDF" in bio
# --- 1. THE HTTP PROXY LAYER ---
@app.api_route("/api/{path:path}", methods=["GET", "POST", "PUT", "PATCH", "DELETE"])
async def proxy_http_request(path: str, request: Request):
"""Intercepts and forwards all discord.py REST API actions."""
token = request.headers.get("Authorization")
# Strictly enforce the bio check on HTTP requests
if not await verify_bot_bio(token):
return Response(content='{"error": "MDF Verification Failed: Missing required bio."}', status_code=401)
# Forward the clean request to official Discord servers
async with httpx.AsyncClient() as client:
body = await request.body()
discord_url = f"{DISCORD_HTTP_API}/{path}"
headers = dict(request.headers)
# Point the host header to Discord, not your proxy address
headers["host"] = "discord.com"
res = await client.request(
method=request.method,
url=discord_url,
headers=headers,
content=body,
params=request.query_params
)
return Response(content=res.content, status_code=res.status_code, headers=dict(res.headers))
# --- 2. THE WEBSOCKET GATEWAY PROXY ---
@app.websocket("/gateway")
async def proxy_websocket_gateway(client_ws: WebSocket):
"""Intercepts the live discord.py event connection stream."""
await client_ws.accept()
# Connect out to real Discord Gateway
async with httpx.AsyncClient() as client:
# Connect to Discord's actual live feed
async with websockets.connect(DISCORD_WS_GATEWAY) as discord_ws:
# Target loops to pass inputs down the pipe continuously
async def forward_to_discord():
try:
while True:
client_msg = await client_ws.receive_text()
# Note: You can parse 'client_msg' here to inspect the payload Token
# during the initial IDENTIFY handshake phase for added security.
await discord_ws.send(client_msg)
except Exception:
pass
async def forward_to_client():
try:
while True:
discord_msg = await discord_ws.recv()
await client_ws.send_text(discord_msg)
except Exception:
pass
# Run both background relays simultaneously
await asyncio.gather(forward_to_discord(), forward_to_client())
Real-time HTTP interception trace and access logs.
Set a 6-digit PIN to protect your dashboard.
Anyone on a new device will need this PIN.
This PIN is only required on new or unrecognized devices.
This device isn't recognized. Enter your security PIN
to access your bot dashboard.
5 failed attempts will lock this account for 15 minutes.