A sleek, lightweight utility bot built with discord.py that utilizes Discord's User-Installable Application (User App) architecture. This application enables you to deploy a hidden, personal slash command (/send) that can be executed anywhere across the entire Discord ecosystem—including servers, Direct Messages, and Group DMs.
The application leverages interactive UI button components and asynchronous background workers to safely and seamlessly dispatch messages across different communication channels.
- Global User App Architecture: Install the bot directly to your personal Discord profile. Execute commands across multiple servers and DMs without needing to formally invite the bot profile to every guild.
- Ephemeral UI Control Center: Command招invocations trigger secure, ephemeral responses (visible only to you) featuring interactive UI buttons to deploy the message stream.
- Asynchronous Execution: Handles message dispatching via background tasks (
asyncio.create_task) to completely prevent gateway timeouts or freezing the application state. - Resilient Error Handling: Gracefully intercepts API exceptions (such as
403 Forbiddenlimits) and manages localized cooldowns automatically.
- Python 3.10+
discord.py(v2.4.0 or higher recommended for AppCommandContext parameters)- An active Discord Bot Token with application command scopes enabled.
-
Clone the repository:
git clone https://github.com/masterytx/Discord-ghost-msg-bot.git cd Discord-ghost-msg-bot -
Install the dependencies
pip install discord.py -
Add Bot Token
nano Ghost.pyThen replace BOT_TOKEN_HERE whit actual bot token -
Launch the bot
python Ghost.py
How to Use
- Ensure the application is configured as a User Installable App inside your Discord Developer Portal under the Installation tab.
- Go to any server channel, DM, or Group DM and type /send.
- Provide the input arguments: the text you want to transmit and the amount of times to echo it.
- Click the interactive Send button on the ephemeral message to launch the background execution.
This repository is created strictly for educational, testing, and self-hosting experimentation purposes. Users are expected to comply with Discord's Developer Terms of Service when deploying custom global application interactions.