Skip to content

Command Guide

Iván Pérez edited this page Apr 30, 2025 · 2 revisions

Ui-Py Command Guide

This guide provides detailed information about all commands available in the Ui-Py Discord bot. All commands are implemented as Discord slash commands, so they can be accessed by typing / in Discord chat.

System Commands

/help

Shows a list of available commands or details about a specific command.

  • Usage: /help [command_name]
  • Parameters:
    • command_name (optional): Name of the command you want details about
  • Example: /help ping

/ping

Checks the bot's response time to Discord.

  • Usage: /ping
  • Example: /ping → "🏓 Pong! Latency: 42ms"

/info

Shows information about the bot, including versions, uptime, and memory usage.

  • Usage: /info

/load

Admin only. Loads an extension module.

  • Usage: /load <extension>
  • Parameters:
    • extension: The extension module to load (e.g., system.help)

/unload

Admin only. Unloads an extension module.

  • Usage: /unload <extension>
  • Parameters:
    • extension: The extension module to unload

/reload

Admin only. Reloads an extension module.

  • Usage: /reload <extension>
  • Parameters:
    • extension: The extension module to reload

/sync

Owner only. Synchronizes application commands with Discord.

  • Usage: /sync <subcommand>
  • Subcommands:
    • global: Syncs commands globally (can take up to an hour)
    • guild [guild_id]: Syncs commands to a specific guild (usually instant)

/shutdown

Admin only. Gracefully shuts down the bot.

  • Usage: /shutdown

Moderation Commands

/clear

Removes multiple messages in bulk.

  • Usage: /clear [amount] [user]
  • Parameters:
    • amount (optional): Number of messages to delete (default: 2)
    • user (optional): Only delete messages from this user
  • Example: /clear 10 @Username

Tool Commands

Media Link Redirection

The bot automatically converts various media links to their embeddable alternatives:

  • Twitter/X links → fxtwitter.com
  • Bluesky links → fxbsky.app
  • TikTok links → vm.tnktok.com
  • Instagram links → ddinstagram.com
  • Pixiv links → phixiv.net
  • YouTube shorts → youtu.be
  • Reddit links → vxreddit.com

/music

Music-related commands are still in development.

  • Check back later for updates on music playback functionality.

Permission Requirements

  • User Commands: No special permissions required for basic commands like /help, /ping, and /info
  • Moderation Commands:
    • /clear: Requires "Manage Messages" permission
  • Admin Commands:
    • /load, /unload, /reload, /shutdown: Requires "Administrator" permission
  • Owner Commands:
    • /sync: Only available to the bot owner

Adding Custom Commands

If you're developing with Ui-Py, you can add your own commands by:

  1. Creating a new Python file in the functions/ directory
  2. Implementing a command class that inherits from commands.Cog
  3. Adding the command using the @app_commands.command() decorator
  4. Implementing a setup function to register your cog with the bot

See existing command files in the functions/ directory for examples.

Clone this wiki locally