Skip to content

Command Guide

Iván Pérez edited this page Sep 11, 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 → g.embedez.com
  • Pixiv links → phixiv.net
  • YouTube shorts → youtu.be
  • Reddit links → vxreddit.com

Music Commands

The bot can play music from YouTube in a voice channel.

/play

Plays a song from a YouTube URL or search query.

  • Usage: /play <query>
  • Parameters:
    • query: A YouTube URL or a search term.
  • Example: /play Never Gonna Give You Up

/stop

Stops the music and disconnects the bot from the voice channel.

  • Usage: /stop

/pause

Pauses the currently playing music.

  • Usage: /pause

/resume

Resumes the paused music.

  • Usage: /resume

/queue

Shows the current music queue.

  • Usage: /queue

/skip

Skips the current song and plays the next one in the queue.

  • Usage: /skip

/shuffle

Shuffles the songs in the queue.

  • Usage: /shuffle

Nintendo Commands

The bot can store your Nintendo Switch Friend Code and share it with others.

/link-nintendo

Links your Discord account to your Nintendo Switch Friend Code.

  • Usage: /link-nintendo <nintendo_id>
  • Parameters:
    • nintendo_id: Your Friend Code (e.g., SW-1234-5678-9012)
  • Example: /link-nintendo SW-0000-0000-0000

/share

Shares your linked Nintendo Switch Friend Code in the channel.

  • Usage: /share
  • Example: /share → "Here's my Nintendo Switch Friend ID! SW-0000-0000-0000"

Steam Commands

The bot can link your Steam account to find and share game lobbies.

/link-steam

Links your Discord account to your Steam account using your SteamID64 or vanity URL.

  • Usage: /link-steam <steam_identifier>
  • Parameters:
    • steam_identifier: Your SteamID64 or vanity URL/profile link.
  • Example: /link-steam 76561198000000000 or /link-steam https://steamcommunity.com/id/your-vanity-url/

/lobby

Generates a Steam lobby invite link for the game you are currently playing.

  • Usage: /lobby
  • Example: /lobby → Generates an embed with a link to join the game lobby.

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.