|
@@ -394,7 +394,7 @@ For support, contact your bot administrator.
|
|
|
|
|
|
# Check if token filter is provided
|
|
|
token_filter = None
|
|
|
- if len(context.args) >= 1:
|
|
|
+ if context.args and len(context.args) >= 1:
|
|
|
token_filter = context.args[0].upper()
|
|
|
|
|
|
orders = self.client.get_open_orders()
|
|
@@ -1049,7 +1049,7 @@ For support, contact your bot administrator.
|
|
|
return
|
|
|
|
|
|
try:
|
|
|
- if len(context.args) < 2:
|
|
|
+ if not context.args or len(context.args) < 2:
|
|
|
await update.message.reply_text(
|
|
|
"❌ Usage: /long [token] [USDC amount] [price (optional)]\n"
|
|
|
"Examples:\n"
|
|
@@ -1136,7 +1136,7 @@ For support, contact your bot administrator.
|
|
|
return
|
|
|
|
|
|
try:
|
|
|
- if len(context.args) < 2:
|
|
|
+ if not context.args or len(context.args) < 2:
|
|
|
await update.message.reply_text(
|
|
|
"❌ Usage: /short [token] [USDC amount] [price (optional)]\n"
|
|
|
"Examples:\n"
|
|
@@ -1223,7 +1223,7 @@ For support, contact your bot administrator.
|
|
|
return
|
|
|
|
|
|
try:
|
|
|
- if len(context.args) < 1:
|
|
|
+ if not context.args or len(context.args) < 1:
|
|
|
await update.message.reply_text(
|
|
|
"❌ Usage: /exit [token]\n"
|
|
|
"Example: /exit BTC"
|
|
@@ -1327,7 +1327,7 @@ This will place a market {exit_side} order to close your entire {token} position
|
|
|
return
|
|
|
|
|
|
try:
|
|
|
- if len(context.args) < 1:
|
|
|
+ if not context.args or len(context.args) < 1:
|
|
|
await update.message.reply_text(
|
|
|
"❌ Usage: /coo [token]\n"
|
|
|
"Example: /coo BTC\n\n"
|
|
@@ -1402,7 +1402,7 @@ This action cannot be undone.
|
|
|
return
|
|
|
|
|
|
try:
|
|
|
- if len(context.args) < 2:
|
|
|
+ if not context.args or len(context.args) < 2:
|
|
|
await update.message.reply_text(
|
|
|
"❌ Usage: /sl [token] [price]\n"
|
|
|
"Example: /sl BTC 44000\n\n"
|
|
@@ -1529,7 +1529,7 @@ This will place a limit {exit_side} order at ${stop_price:,.2f} to protect your
|
|
|
return
|
|
|
|
|
|
try:
|
|
|
- if len(context.args) < 2:
|
|
|
+ if not context.args or len(context.args) < 2:
|
|
|
await update.message.reply_text(
|
|
|
"❌ Usage: /tp [token] [price]\n"
|
|
|
"Example: /tp BTC 50000\n\n"
|