Copperx Telegram Bot
  1. commands
Copperx Telegram Bot
  • index
  • readme
  • setup
  • development
  • api-integration
  • troubleshooting
  • architechture
  • callbacks
    • index (all callbacks)
    • wallet
    • transfer-callback
    • send
  • commands
    • help
    • index(all commands)
    • login
    • logout
    • start
    • transfer
    • transfer
  • notifications
    • deposite-notification
  • Register Telegram Webhook to your url
    POST
  1. commands

index(all commands)

Command Reference#

This section provides a comprehensive reference for all commands available in the CopperX Payout Bot.

Available Commands#

CommandDescriptionAuthentication RequiredKYC Required
/startStart the bot and see welcome messageNoNo
/loginLog in to your CopperX accountNoNo
/walletManage your cryptocurrency walletYesYes
/transferAccess all transfer-related featuresYesYes
/sendQuick command to send fundsYesYes
/logoutLog out from your CopperX accountYesNo
/helpShow help message with all commandsNoNo

Command Details#

Each command has its own detailed documentation:
/start - Initialize the bot and view welcome message
/login - Authenticate with your CopperX account
/wallet - Manage your cryptocurrency wallets
/transfer - View and manage your transfers
/send - Send funds to users (alias for transfer send)
/logout - End your current session
/help - Get comprehensive help with the bot

Command Implementation#

Commands are implemented in the src/bot/operations/command.operations.ts file, which maps command names to their handler functions:
When a user sends a command, the webhook handler extracts the command name and calls the appropriate handler function.

Command Flow#

Most commands follow this general flow:
1.
Authentication Check: Verify if the user is authenticated (if required)
2.
KYC Verification: Check if the user has completed KYC (if required)
3.
Command Processing: Execute the command-specific logic
4.
Response Generation: Send a response to the user, often with inline keyboards
5.
State Management: Update the user's session state if necessary

Adding New Commands#

To add a new command to the bot:
1.
Add the command to the CommandsEnum in src/constants/bot-commands.ts
2.
Create a handler function in the appropriate file under src/bot/handlers/
3.
Add the command to commandOperations in src/bot/operations/command.operations.ts
4.
Add the command to BotCommands array in src/constants/bot-commands.ts to make it available in the Telegram menu
5.
Run npm run setup to update the commands with Telegram
For more details on specific commands, click on the links in the Command Details section above.
Modified at 2025-03-23 17:06:50
Previous
help
Next
login
Built with