Discord2Fivepy
Discord2Fivepy - Discord bot for ESX servers that executes FiveM commands from Discord. Compatible with ESX framework for FiveM servers.
Discord2Fivepy - Remote Server Administration Through Discord
Manage your FiveM ESX server directly from Discord with this powerful Python-based bot that bridges Discord commands to in-game server operations. Built for server owners and administrators who need remote control capabilities, this bot handles player management, resource control, economy operations, and server monitoring without requiring in-game access. Perfect for managing your server while away from your PC or coordinating administrative actions with your staff team through Discord.
Why This Bot Exists
This project was created to solve a common problem: existing Discord admin bots for FiveM servers were either extremely expensive or severely limited in functionality. Rather than paying premium prices for basic features, this open-source alternative provides comprehensive server control at an affordable price point. It's designed for server owners who want professional-grade admin tools without subscription fees or feature restrictions.
Unlike web panels that require port forwarding and security configuration, Discord2Fivepy leverages Discord's existing infrastructure. Your staff already uses Discord for communication - now they can use it for server administration too.
Complete Command Suite
Player Management Commands - Check server status with real-time player counts and server performance metrics (=status). Revive downed players instantly without logging into the game (=revive). Kick problematic players with custom messages (=kick). All player commands support both player IDs and partial name matching for quick administrative action.
Economy & Inventory Control - Grant account money directly to players' bank, cash, or black money accounts (=giveaccountmoney). Add items to player inventories for events, compensation, or testing (=giveitem). Issue weapons to law enforcement, security, or event participants (=giveweapon). All economy commands include amount validation and logging to prevent abuse.
Job & Permissions Management - Assign players to jobs with specific grades instantly (=setjob). Useful for hiring processes, promotions, or fixing job-related bugs without requiring players to re-log. Supports all ESX jobs and custom job frameworks with proper grade verification.
Resource Management - Refresh the server's resource list to detect newly added scripts (=refresh). Start resources that are stopped or newly installed (=start). Stop misbehaving or problematic resources immediately (=stop). Restart resources to apply configuration changes without full server restarts (=restart). These commands give you complete control over your server's runtime without SSH access.
Server Announcements - Broadcast server-wide announcements to all connected players (=announce). Perfect for maintenance warnings, event notifications, or server-wide messages. Announcements appear in-game with configurable styling and duration.
Technical Architecture
Discord2Fivepy runs as a standalone Python application that connects to your FiveM server and Discord bot simultaneously. The bot listens for Discord commands in designated admin channels, validates permissions, executes the corresponding server-side operations, and returns results via Discord embeds. All communication is secured and encrypted.
The Python script handles rate limiting to prevent command spam, includes error handling for invalid inputs, and logs all administrative actions for accountability. If a command fails (player not found, resource doesn't exist, insufficient permissions), the bot replies with detailed error messages and suggestions.
Webhook Integration & Logging
Every command executed through the bot sends detailed logs to a configurable Discord webhook. These logs include: who executed the command, what command was run, target players/resources affected, success/failure status, and timestamps. This creates a comprehensive audit trail of all administrative actions taken through the bot.
Error webhooks notify administrators when commands fail, helping you troubleshoot issues quickly. If a player tries to use =giveaccountmoney but specifies an invalid account type, the webhook shows exactly what went wrong and how to fix it.
Customization & Configuration
All Discord embeds sent by the bot are fully customizable. Change embed colors to match your server branding, modify titles and descriptions, add custom footers with server names or branding, and include thumbnail images or server logos. The bot's responses look professional and cohesive with your Discord server's aesthetic.
Command permissions are role-based. Assign specific Discord roles that can use each command category: all staff can use =status and =announce, moderators can =kick and =revive, but only senior admins can =giveaccountmoney and =setjob. This granular permission system prevents junior staff from accessing sensitive economy commands.
The configuration file includes detailed comments explaining every setting: Discord bot token, FiveM server IP and port, command prefixes (change = to ! or . if desired), permission role IDs, webhook URLs, cooldown timers, and embed styling options.
Security Features
- Permission Validation - Every command checks Discord role permissions before execution
- Command Logging - All actions logged to webhook with full accountability
- Rate Limiting - Prevents spam and accidental command floods
- Input Sanitization - Validates player IDs, amounts, and resource names
- Secure Communication - Encrypted connection between bot and FiveM server
- No In-Game Exposure - Bot operates externally, not accessible to players
Perfect For
- Server owners who travel frequently and need remote administration capabilities
- Staff teams coordinating admin actions through Discord channels
- Communities wanting accountability and logging for administrative actions
- Servers with large admin teams needing role-based command permissions
- Administrators who manage multiple servers and want centralized control
- Events requiring rapid player management without in-game admin menus
Requirements & Dependencies
- Python 3.9.2 or newer (Python 3.10+ recommended for best performance)
- FXServer (any recent build)
- ESX 1.1 or newer (Legacy, Final, or custom ESX versions supported)
- Discord Bot with proper permissions and token
- Discord Server with dedicated admin channels
- Python Libraries - discord.py, requests, asyncio (auto-installed via requirements.txt)
Installation & Setup
- Install Python 3.9.2+ on your server or local machine
- Create a Discord bot at Discord Developer Portal and get the token
- Download Discord2Fivepy and extract to a dedicated folder
- Install Python dependencies: pip install -r requirements.txt
- Configure config.py with your Discord token, FiveM server details, and webhook URLs
- Set up Discord role permissions for command access levels
- Run the bot: python bot.py
- Test commands in your Discord server to verify functionality
- Configure auto-start scripts to keep the bot running 24/7
Command Reference
- =status - Display server status, player count, and performance metrics
- =revive [playerID] - Revive a downed player instantly
- =giveaccountmoney [playerID] [account] [amount] - Add money to player accounts
- =giveitem [playerID] [itemName] [quantity] - Add items to player inventory
- =giveweapon [playerID] [weaponName] [ammo] - Give weapons to players
- =refresh - Refresh server resource list
- =start [resourceName] - Start a stopped resource
- =stop [resourceName] - Stop a running resource
- =restart [resourceName] - Restart a resource to apply changes
- =setjob [playerID] [jobName] [grade] - Assign player to job with grade
- =kick [playerID] [reason] - Kick player from server with message
- =announce [message] - Broadcast server-wide announcement
What Makes It Stand Out
Most FiveM Discord bots focus solely on status monitoring or basic player counts. Discord2Fivepy provides actual administrative control - you can manage your entire server economy, resource state, and player roster from Discord. The comprehensive logging system creates accountability that in-game admin menus can't match.
Being open-source means you can modify the bot to add custom commands specific to your server's needs. Want to add =givevehicle or =teleportplayer? The codebase is structured for easy expansion. The developer encourages customization while offering the base system as a solid foundation.
The role-based permission system is particularly valuable for large staff teams. Junior moderators can handle =revive and =kick for player support, while senior admins control =giveaccountmoney and =setjob for economy management. This separation of powers prevents accidents and abuse.
I started this project because I was looking for a Discord Bot capable of doing ESX commands, I found one but I just felt the price was too much for so little.
Requirements:- Python 3.9.2
- FXServer
- ESX 1.1 or older
- Status (=status)
- Revive (=revive)
- Give Account Money (=giveaccountmoney)
- Give Item (=giveitem)
- Give Weapon (=giveweapon)
- Refresh Resources (=refresh)
- Start Resource (=start)
- Stop Resource (=stop)
- Restart Resource (=restart)
- Set Job (=setjob)
- Kick (=kick)
- Announce (=announce)
Related Products You Might Like
- FiveM AntiCheat 2025 - Essential server protection with 314+ servers using it
- ESX Plugin For EasyAdmin - Advanced admin tool compatible with your Discord commands
- Super ESX Server - Complete ESX server base with admin integration
- ESX Server Base (by RibSosay) - Premium server foundation trusted by 292+ servers





