Custom Commands

Create your own simple or advanced commands.

Custom commands come in two shapes: simple JSON message lists that need no code, and full Python cogs that can do anything a cog can do.

Simple commands

Quick text-based commands. No coding required, just define your messages in JSON. Files are stored in custom/simple/. Each file is named after the command and contains a JSON array of messages to send.

// custom/simple/greet.json
[
  { "message": "Hello! Welcome to the server."", "delay": 0, "autodelete": 0 },
  { "message": "Read the rules in #rules!"", "delay": 2000, "autodelete": 10000 }
]
FieldDescription
messageThe text to send. Supports regular text, markdown, and embed-formatted content.
delayMilliseconds to wait before sending this message. Use 0 for an instant send.
autodeleteMilliseconds after which the message is automatically deleted. Use 0 to keep it permanently.
Trigger with /simple <name> or command <name>. The output posts visibly to the channel.

Advanced commands

Full Python cogs for complete control over bot behavior. Files are stored in custom/advanced/. Each file is a standard discord.py cog.

# custom/advanced/helper.py
import discord
from discord.ext import commands

class Helper(commands.Cog):
def __init__(self, bot):
    self.bot = bot

@commands.command(help="helper » Get help information")
async def helper(self, ctx, topic: str = None):
    if topic:
        await ctx.send(f"Help on: {topic}")
    else:
        await ctx.send("Available topics: setup, config, modules")

async def setup(bot):
await bot.add_cog(Helper(bot))
Use getattr(bot, '_selfbot', False) to detect which process the cog is running in, if your code needs to behave differently per-process.

Creating an advanced command

  1. Create the file. Create a new .py file in custom/advanced/.
  2. Define the cog. Write a standard discord.py cog with an async def setup(bot) entry point.
  3. Add commands. Use @commands.command for commands. The help text should follow the format "name » Description".
  4. Restart. Restart the bot to load the new cog, or use /custom reload to reload it without a full restart.

Extra packages

Install additional Python packages that your custom commands or cogs depend on. If your advanced custom commands use external Python libraries (like requests, aiohttp, beautifulsoup4, etc.), those packages need to be installed before the bot starts. You can configure this through the Extra Packages option in the Startup tab.

How to install extra packages

  1. Identify the package. Check your custom command's imports at the top of the .py file. Any package that is not part of the Python standard library or discord.py needs to be installed separately.
  2. Add it to Extra Packages. In the Startup tab of your control panel, find the Extra Packages field. Enter the package name exactly as it appears on PyPI (e.g., requests, beautifulsoup4, pillow).
  3. Multiple packages. If you need multiple packages, enter them one per line. The installer processes each line sequentially before the bot starts.
  4. Start the bot. When you start the bot, the control panel installs the listed packages via pip install before launching the selfbot. You will see installation output in the console.

Examples

  • Installing requests. If your cog has import requests, add requests to the Extra Packages field. The system runs pip install requests automatically on startup.
  • Multiple packages. Enter each package on a separate line:
    requests
    beautifulsoup4
    pillow
  • Specific versions. You can pin versions using standard pip syntax: requests==2.31.0 or pillow>=10.0.
Only install packages from trusted sources. Extra packages run within the same environment as your bot. Malicious packages can access anything the bot process can.

Command aliases

Create shortcuts for existing commands. Aliases are managed via commands in Discord, so there is no need to edit files manually.

  • alias create <alias> <cmd> — create a new shortcut. For example, alias create p ping lets you type p instead of ping.
  • alias remove <alias> — remove an existing shortcut.
  • alias list — show all active aliases.
// custom/alias.json  (auto-managed)
{
  "p": "ping"",
  "h": "help"",
  "bal": "balance""
}

Security notes

  • Only load advanced commands from sources you trust.
  • Custom commands run with restricted permissions. Certain system-level operations are blocked for your safety.
  • Never share your token or advanced command code with untrusted sources.

Next steps

Continue with Context Menus, Configuration or Modules.