Generated comprehensive README documentation for each cog: - dashboard (EveDash): Web dashboard setup & commands - newhelpmenu: Components V2 help system - nexuscore: All-in-one management (tickets, mod, economy, etc.) - selfbotguard: 14-layer selfbot detection - serverwhitelist: Server join management - userslash: User-installable slash commands - voicemeister: Temporary voice channels - wormhole: Cross-server relay (100+ commands) Each README includes: features, installation, commands, data statement.
3.2 KiB
3.2 KiB
UserSlash
User-installable slash commands for Red-DiscordBot — every Red command works in servers, DMs, and group DMs.
What It Does
UserSlash registers a single proxy slash command (named after the bot) that bridges every Red text command through Discord's slash-command interface. After syncing, all global commands are automatically patched with user-install integration types so the bot works as a user-installable app.
Commands work everywhere:
- ✅ Guild channels (where the bot is a member)
- ✅ Bot DMs
- ✅ Group DMs
- ✅ Servers where the bot isn't a member (via user-install)
Requirements
- Red-DiscordBot >= 3.5.0
- Python >= 3.9
rapidfuzz(auto-installed)
Installation
[p]repo add EveCogs https://github.com/everestmcarthur/EveCogs
[p]cog install EveCogs userslash
[p]load userslash
⚠️ Unload OneTrueSlash first if you have it loaded — this cog replaces it.
Setup (One-Time)
- Go to the Discord Developer Portal → Your Application → Installation
- Under Installation Contexts, enable User Install
- Under Default Install Settings — User Install, add the
applications.commandsscope - Run
[p]userslash syncto register & patch commands - Share the OAuth2 User-Install link so users can add your bot to their profile
Commands (Owner Only)
| Command | Description |
|---|---|
[p]userslash sync |
Sync the command tree + patch every command for user-install |
[p]userslash patch |
Patch already-synced commands with user-install flags (no full sync) |
[p]userslash status |
Show per-command user-install status (✅/⚠️) |
Whitelist
| Command | Description |
|---|---|
[p]userslash whitelist enable |
Restrict user-install to whitelisted users only |
[p]userslash whitelist disable |
Allow anyone to use user-install |
[p]userslash whitelist add <@users> |
Add users to the whitelist |
[p]userslash whitelist remove <@users> |
Remove users from the whitelist |
[p]userslash whitelist list |
View whitelist status and members |
[p]userslash whitelist clear |
Clear the entire whitelist |
Architecture
userslash/
├── __init__.py # Cog class, lifecycle, owner commands, whitelist
├── slash_bridge.py # Proxy slash command, autocomplete, error handler
├── patcher.py # REST API patcher for user-install flags
├── context.py # InterContext — adapted Context for interactions
├── channel.py # Fake channel for DM/group-DM contexts
├── message.py # Synthetic Message for interaction contexts
└── utils.py # Name validation helpers
How It Works
- On load, registers
/<botname>as a global slash command withintegration_types: [0, 1](guild + user install) - The slash command accepts a
commandparameter with fuzzy autocomplete - When invoked, it finds the matching Red text command and executes it through Red's command system
InterContextwraps the interaction to look like a regularcommands.Contextpatch_all_commandshits the Discord REST API to add user-install flags to every registered command
Data Statement
This cog does not persistently store any data or metadata about users.
License
MIT