All-in-one Discord selfbot โ moderation, utility, fun, monitoring. Hybrid plugin system.
Project description
๐ซ Dismoy
All-in-one Discord selfbot โ moderation, utility, fun, monitoring.
Hybrid plugin system. Triple distribution (pip ยท npm ยท git clone).
Quick Start ยท What is this? ยท Features ยท Commands ยท Plugins ยท Architecture ยท File Reference
โ ๏ธ Disclaimer
Automating user accounts violates Discord's Terms of Service. Using Dismoy may result in account termination. This project is for educational purposes only. The authors are not responsible for any account bans or data loss. Use at your own risk.
๐ What is this?
Dismoy is a Discord selfbot โ a script that automates a Discord user account (not a bot account). It uses discord.py-self, a fork of discord.py that connects to Discord's user API (the same API the official Discord client uses), instead of the bot API.
Selfbot vs Bot โ what's the difference?
| Aspect | Bot Account | Selfbot (User Account) |
|---|---|---|
| Token type | Bot token (from Dev Portal) | User token (from client) |
| Library | discord.py, discord.js | discord.py-self, discord.js-self |
| Slash commands | โ Yes | โ No (interactions = bot only) |
| Intents limit | Capped (message content needs approval) | No limits โ sees everything |
| Voice | โ Yes (with voice lib) | โ Yes (native) |
| ToS | โ Compliant | โ Violates ToS |
| Detection | Impossible (official API) | Detectable via patterns |
What does Dismoy do?
Dismoy is an all-in-one automation toolkit for your Discord user account. It runs in the background and provides:
- Moderation tools โ automatically delete spam, filter keywords, protect your DMs
- Utility tools โ auto-reply when AFK, schedule messages, clean up your DMs, backup servers
- Fun tools โ auto-react to messages, snipe nitro giveaways, mass-react in channels
- Monitoring tools โ log all messages, track when users go online/offline, scrape server data
All of this runs as your account โ no bot invite needed, no permissions to set up, just your token.
Why was this built?
This project was inspired by the discord-userdoccers project โ a community effort to document Discord's undocumented user API. Dismoy is a practical application of that knowledge: a working, modular, extensible selfbot built on top of that API.
๐ Quick Start
Option A: npm (recommended)
npm install -g dismoy
dmy # First run โ setup wizard โ auto-start
Or without installing:
npx dismoy # Same flow
Option B: pip
pip install dismoy
dismoy # First run โ setup wizard โ auto-start
Option C: git clone
git clone https://github.com/mocasus/dismoy.git
cd dismoy
pip install -r requirements.txt
python main.py # First run โ setup wizard โ auto-start
All three methods produce the same result. The npm wrapper is a thin shim that installs the Python package under the hood โ it handles venv creation, dependency installation, and updates automatically.
โจ Features
๐ก๏ธ Moderation Module
Automated protection for servers and DMs you're in.
| Feature | What it does | Config key |
|---|---|---|
| Keyword Filter | Auto-deletes any message containing filtered words. Manage via !filter add/remove/list. |
filtered_words |
| Anti-Spam | Detects rapid message bursts (5+ messages in 5 seconds) and auto-deletes them. Per-user tracking with sliding window. | antispam |
| DM Guard | Restricts DM interactions to friends only. Toggle on/off via !dmguard. |
dmguard |
How anti-spam works: Each user has a deque(maxlen=10) that stores message timestamps. When a new message arrives, timestamps older than 5 seconds are popped. If 5+ timestamps remain, the message is deleted and the counter resets. This is a sliding window approach โ more accurate than fixed window.
๐ง Utility Module
Quality-of-life automation for your account.
| Feature | What it does | Command |
|---|---|---|
| AFK Mode | Auto-replies to mentions with a custom message. Includes timestamp of when you went AFK. | !afk <message> |
| Auto-Reply | Trigger-based responses โ if someone types a trigger word, bot replies automatically. Multiple rules supported. | !autoreply add <trigger> | <response> |
| Scheduled Messages | Send messages at a specific time (HH:MM format). Background task checks every 30 seconds. | !schedule <HH:MM> <message> |
| DM Cleaner | Bulk-delete your own messages in any DM channel. 0.5s delay between deletions for rate limit safety. | !dmclean <count> |
| Guild Backup | Exports guild channels, roles, and member count to a timestamped JSON file in ~/.dismoy/backups/. |
!backup <guild_id> |
How scheduled messages work: A background asyncio task runs every 30 seconds, comparing current time (HH:MM) against scheduled items. If a match is found, the message is sent and the item is removed from the queue. Messages that don't match are kept for the next cycle.
๐ Fun Module
Social automation and sniping tools.
| Feature | What it does | Command |
|---|---|---|
| Auto-React | Automatically adds a chosen emoji reaction to every message you send. | !autoreact <emoji> |
| Nitro Sniper | Detects Discord nitro gift links in any message across all servers + DMs. Extracts the gift code and attempts to claim it. | !sniper (toggle) |
| Giveaway Sniper | Detects giveaway messages from known giveaway bots. Auto-reacts with ๐ and clicks "Join"/"Enter" buttons if present. | !sniper (toggle) |
| Mass React | Reacts to the last 20 messages in a channel with a chosen emoji. 0.3s delay between reactions for rate limit safety. | !massreact <emoji> |
How nitro sniper works: Every incoming message is scanned for discord.gift/ or discordapp.com/gifts/ URLs. If found, the gift code is extracted via regex. After a 1-second delay (to avoid suspicion), the bot attempts to redeem the code. Known giveaway bot IDs are checked for giveaway detection.
๐๏ธ Monitoring Module
Surveillance and logging tools.
| Feature | What it does | Command |
|---|---|---|
| Message Logger | Logs every incoming message to a daily JSONL file (~/.dismoy/logs/messages/YYYYMMDD.jsonl). Each entry includes timestamp, guild, channel, author, content, and attachment URLs. |
!log on/off |
| Online Tracker | Monitors status changes (online/idle/dnd/offline) for specific users. Uses the on_member_update event. Logs to console + activity feed. |
!track <user_id> |
| Server Activity | Maintains a rolling log of the last 100 events per guild (messages, status changes). Viewable via command. | !activity |
| Scraper | Exports guild members (up to 1000) and channels to a JSON file in ~/.dismoy/scrapes/. Includes name, ID, display name, roles, join date. |
!scrape <guild_id> |
How message logger works: Each message is serialized to a JSON object and appended to a JSONL (JSON Lines) file. JSONL format means one JSON object per line โ easy to parse with jq, python -m json.tool, or any JSONL reader. Files are rotated daily.
๐ Commands
Prefix is configurable (default !). All commands are typed as your own messages and executed instantly.
Core Commands
| Command | Description |
|---|---|
!ping |
Check bot latency |
!help |
Show all available commands grouped by module |
!modules |
Show loaded module status (enabled/disabled per module) |
!reload |
Reload all modules without restarting the bot |
Moderation
| Command | Description |
|---|---|
!filter add <word> |
Add keyword to filter list |
!filter remove <word> |
Remove keyword from filter |
!filter list |
Show all filtered keywords |
!antispam |
Toggle anti-spam protection |
!dmguard |
Toggle DM guard |
Utility
| Command | Description |
|---|---|
!afk <message> |
Set AFK mode with custom message |
!afk |
Disable AFK mode |
!autoreply add <trigger> | <response> |
Add auto-reply rule (pipe separates trigger from response) |
!autoreply list |
Show all auto-reply rules |
!autoreply remove <trigger> |
Remove auto-reply rule |
!schedule <HH:MM> <message> |
Schedule a message (24h format) |
!dmclean <count> |
Delete your last N messages in current DM channel |
!backup <guild_id> |
Export guild data to JSON file |
Fun
| Command | Description |
|---|---|
!autoreact <emoji> |
Enable auto-react with chosen emoji |
!autoreact off |
Disable auto-react |
!massreact <emoji> |
React to last 20 messages with emoji |
!sniper |
Toggle nitro + giveaway sniper |
!sniper status |
Show sniper status |
Monitoring
| Command | Description |
|---|---|
!log on / !log off |
Toggle message logging |
!track <user_id> |
Start tracking a user's online status |
!track list |
Show all tracked users |
!track clear |
Clear tracked users |
!scrape <guild_id> |
Scrape guild members + channels to JSON |
!activity |
Show recent server activity (last 10 events) |
๐ง Setup Wizard
First run triggers an interactive setup wizard:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ซ Dismoy โ Discord Selfbot โ
โ v1.0.0 โข mocasus โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ซ Welcome to Dismoy setup!
๐ Discord user token: ****
โ๏ธ Command prefix [!]: !
๐ฆ Enable moderation? [Y/n]: y
๐ฆ Enable utility? [Y/n]: y
๐ฆ Enable fun? [Y/n]: y
๐ฆ Enable monitoring? [Y/n]: y
๐ Enable custom plugins? [Y/n]: y
๐ Log level [INFO]: INFO
โ
Config saved to ~/.dismoy/config.yaml
๐ Starting Dismoy...
The wizard creates a config file at ~/.dismoy/config.yaml and a plugins directory at ~/.dismoy/plugins/.
โ๏ธ Configuration
Config is stored at ~/.dismoy/config.yaml:
token: "your_user_token"
prefix: "!"
modules:
moderation:
enabled: true
settings:
filtered_words: ["spam", "scam"]
antispam: false
dmguard: false
utility:
enabled: true
settings: {}
fun:
enabled: true
settings:
nitro_sniper: true
giveaway_sniper: true
monitoring:
enabled: true
settings:
message_logging: false
plugins:
enabled: true
directory: ~/.dismoy/plugins
logging:
level: INFO
file: ~/.dismoy/logs/dismoy.log
Directory Structure After Setup
~/.dismoy/
โโโ config.yaml # Main configuration
โโโ plugins/ # Drop .py files here โ auto-loaded
โโโ logs/
โ โโโ dismoy.log # Main log file
โ โโโ messages/ # Message logger output
โ โโโ 20260708.jsonl # Daily JSONL files
โโโ backups/ # Guild backup JSON files
โโโ scrapes/ # Scraper output JSON files
โโโ venv/ # Python virtual environment (npm only)
๐ Plugin System
Dismoy supports custom plugins โ drop a .py file in ~/.dismoy/plugins/ and it auto-loads on startup. No restart needed for development (use !reload).
Plugin API
"""My custom plugin."""
async def setup(bot):
"""Called when plugin loads."""
print("My plugin loaded!")
async def on_ready(bot):
"""Called when bot connects to Discord."""
print(f"Connected as {bot.user}")
async def on_message(bot, message):
"""Called on every incoming message."""
if message.author.id == bot.user.id:
return # Skip own messages
# Your logic here
if "hello" in message.content.lower():
print(f"Someone said hello in {message.channel}")
Available Hooks
| Hook | When it's called | Parameters |
|---|---|---|
setup(bot) |
Plugin load | bot โ DismoyBot instance (discord.Client subclass) |
on_ready(bot) |
Bot connected to Discord | bot โ DismoyBot instance |
on_message(bot, message) |
Any incoming message | bot, message โ discord.Message object |
Plugin Objects
botโ Fulldiscord.Clientinstance with all discord.py-self methodsconfigโ Bot config dict (loaded fromconfig.yaml)bot.prefixโ Command prefix stringbot.handle_commandโ Override to add custom commands (see built-in modules for examples)
Example: Custom Command Plugin
"""Custom commands plugin."""
async def setup(bot):
original = bot.handle_command
async def extended_handle(message):
from dismoy.utils.helpers import extract_code_from_message
command, args = extract_code_from_message(message.content, bot.prefix)
if command == "hello":
await message.edit(content="๐ Hello from my plugin!")
return
await original(message) # Fall through to other handlers
bot.handle_command = extended_handle
An example plugin is included at dismoy/plugins/example_plugin.py.
๐๏ธ Architecture
Overview
Dismoy uses a hybrid modular architecture:
- Core โ
DismoyBotclass (extendsdiscord.Client), handles connection, event dispatch, command routing - Built-in modules โ 4 modules loaded based on config. Each module can register commands, hook into events, and maintain state
- Plugin system โ Custom plugins loaded from
~/.dismoy/plugins/. Same API as built-in modules
How Modules Work
Each module is a Python file with these optional functions:
async def setup(bot, settings):
"""Called on load. Register commands, initialize state."""
async def on_ready(bot):
"""Called when bot connects to Discord."""
async def on_message(bot, message):
"""Called on every incoming message."""
The bot's on_message event chains through all enabled modules in order: moderation โ utility โ fun โ monitoring โ plugins. Each module's on_message is called sequentially.
Command Chaining
Commands use a decorator chain pattern. Each module wraps bot.handle_command with its own handler:
User sends: "!filter add spam"
โ
โผ
bot.handle_command (outermost = last loaded module)
โ
โผ
monitoring.handle_command โ not my command โ pass through
โ
โผ
fun.handle_command โ not my command โ pass through
โ
โผ
utility.handle_command โ not my command โ pass through
โ
โผ
moderation.handle_command โ "filter add" โ handle โ return
If no module handles the command, the original handler runs (core commands like !ping, !help).
How the npm Wrapper Works
The npm package contains only cli.js (~7KB, zero dependencies). It:
- First run: Clones the repo to
~/.dismoy/, creates a Python venv, installs dependencies, runs setup wizard - Subsequent runs: Spawns Python directly from venv
- Update:
git pull+pip install -r requirements.txt - Commands:
dmy setup,dmy start,dmy update,dmy modules,dmy version
The short command dmy is provided as a convenience alias.
Data Flow
Discord Gateway
โ
โผ
discord.py-self (websocket)
โ
โผ
DismoyBot.on_message()
โ
โโโ Is it a command? โ handle_command chain โ module handles it
โ
โโโ Not a command โ on_message chain โ each module processes it
โ
โโโ moderation: keyword filter + antispam check
โโโ utility: AFK response + auto-reply check
โโโ fun: nitro/giveaway detection
โโโ monitoring: log to JSONL + track activity
๐ File Reference
Every file in the repo, explained:
Root
| File | Purpose |
|---|---|
main.py |
Git clone entry point. Calls dismoy.cli.main(). |
pyproject.toml |
pip package config. Defines dismoy console script entry point, dependencies, metadata. |
requirements.txt |
Python dependencies: discord.py-self, pyyaml, rich. |
LICENSE |
MIT license. |
.gitignore |
Ignores __pycache__, .env, config.yaml, data/, logs/, node_modules/. |
README.md |
This file. |
assets/logo.png |
Placeholder logo (replace with your own). |
assets/banner.png |
Placeholder banner. |
dismoy/ โ Core Package
| File | Purpose |
|---|---|
__init__.py |
Package metadata: __version__, __author__, __license__. |
__main__.py |
Entry point for python -m dismoy. Calls cli.main(). |
cli.py |
CLI argument parsing + interactive setup wizard. Handles setup, start, modules, version subcommands. |
bot.py |
DismoyBot class โ extends discord.Client. Manages module loading, event dispatch, command routing, plugin loading. |
config.py |
Config management โ loads/saves YAML at ~/.dismoy/config.yaml. Provides DEFAULT_CONFIG_DIR, DEFAULT_CONFIG_FILE, DEFAULT_PLUGINS_DIR. |
dismoy/modules/ โ Built-in Modules
| File | Module | Key Functions |
|---|---|---|
moderation.py |
๐ก๏ธ Moderation | Keyword filter (filtered_words set), anti-spam (sliding window deque per user), DM guard toggle. Commands: filter, antispam, dmguard. |
utility.py |
๐ง Utility | AFK mode (auto-reply on mention), auto-reply (triggerโresponse dict), scheduled messages (background asyncio task, 30s interval), DM cleaner (bulk delete with rate limit), guild backup (JSON export). Commands: afk, autoreply, schedule, dmclean, backup. |
fun.py |
๐ Fun | Auto-react (emoji on own messages), nitro sniper (regex URL detection + code extraction), giveaway sniper (known bot ID detection + auto-react + button click), mass react. Commands: autoreact, massreact, sniper. |
monitoring.py |
๐๏ธ Monitoring | Message logger (JSONL daily files), online tracker (on_member_update event), server activity (rolling 100-event log per guild), guild scraper (up to 1000 members + channels to JSON). Commands: log, track, scrape, activity. |
dismoy/plugins/ โ Plugin System
| File | Purpose |
|---|---|
loader.py |
PluginLoader class โ scans directory for .py files, loads each as a Python module via importlib, calls setup() hook. Supports load_all() and reload_all(). |
example_plugin.py |
Template plugin with all hooks demonstrated. Copy this to ~/.dismoy/plugins/ to start. |
dismoy/utils/ โ Utilities
| File | Purpose |
|---|---|
__init__.py |
Exports: setup_logger, rate_limit, extract_code_from_message, is_nitro_gift, is_giveaway_bot. |
logger.py |
Sets up RichHandler for colored console output + optional file handler for persistent logging. |
helpers.py |
rate_limit() decorator (sliding window), extract_code_from_message() (parses !command args format), is_nitro_gift() (regex for Discord gift URLs), is_giveaway_bot() (checks against known giveaway bot IDs). |
npm/ โ npm Wrapper Package
| File | Purpose |
|---|---|
package.json |
npm package config. Defines dismoy and dmy bin commands. Zero runtime dependencies. |
cli.js |
Thin CLI bridge (~7KB). Handles first-run setup (clone + venv + install), start, update, modules, version commands. Uses only Node.js built-in modules (no npm deps). |
.github/workflows/
| File | Purpose |
|---|---|
ci.yml |
GitHub Actions CI. Runs py_compile on all Python files across Python 3.9, 3.10, 3.11, 3.12. |
๐จ Logo
The current logo is a placeholder. Replace assets/logo.png with your own.
AI generation prompt (two-tone flat vector):
Minimalist logo for a Discord selfbot called "Dismoy". A ticket icon (stubby rectangle with notch cutouts on both sides) in white, centered on a dark rounded square background (#1E1F22). Below the ticket, a small "D" monogram. Two-tone flat vector only โ background dark, icon white. No gradients, no glow, no sparkle, no 3D effects. Clean geometric style.
Generate this in ChatGPT, Midjourney, or Ideogram, then replace assets/logo.png and assets/banner.png.
๐ Getting Your Discord User Token
- Open Discord in your browser (not the desktop app)
- Press
F12to open Developer Tools - Go to the Network tab
- Send any message in any channel
- Find the request in the Network tab (look for
messagesendpoint) - In the Request Headers, find
Authorization - Copy the value โ that's your user token
โ ๏ธ NEVER share your token. Anyone with your token has full access to your account.
๐ฆ Distribution
| Method | Command | Entry Point | Short Command |
|---|---|---|---|
| npm | npm install -g dismoy |
dismoy |
dmy |
| pip | pip install dismoy |
dismoy |
โ |
| npx | npx dismoy |
(no install) | โ |
| git clone | git clone + python main.py |
python main.py |
โ |
Publishing
npm:
cd npm && npm publish
pip:
python -m build && twine upload dist/*
๐ License
MIT ยฉ mocasus
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dismoy-1.0.0.tar.gz.
File metadata
- Download URL: dismoy-1.0.0.tar.gz
- Upload date:
- Size: 31.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2396f8435c67b9e1e735eeaf74f348c92a3778a83b8dcbccb96ba5c7312c65cf
|
|
| MD5 |
b123fa6563fb84b5db8265990dbc7bb7
|
|
| BLAKE2b-256 |
e5eeaf7e37fa311148de358ef0552ba1b4b394ca0658dd1cdeadad09615207d7
|
File details
Details for the file dismoy-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dismoy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
526143ce9c7b7da56846cdb266669182edeea3d143c054f074648ccfaa41ef0f
|
|
| MD5 |
342283d8cb6decf8dc04d463f917edeb
|
|
| BLAKE2b-256 |
3c6e86a610d0ada0025d19a9e7123f9b182b48994ac4205e7a1c5a2af2063992
|