Beispiel #1
0
def cancel(bot, update, args):
    #args = message.split()
    if not bm_client.verifyAdmin(update):
        update.effective_message.reply_text("You don't have permissions")
        return
    message = generateData(args, sad._CANCEL_OPERATION_TYPE_)
    update.effective_message.reply_text(message)
def simple(bot, update, args):
    #args = message.split()
    if not bm_client.verifyAdmin(update):
        update.effective_message.reply_text("You don't have permissions")
        return
    message = generateData(args, sad._FUNCTION_SIMPLE_)
    update.effective_message.reply_text(message)
Beispiel #3
0
def ping(bot, update):
    if not bm_client.verifyAdmin(update):
        update.effective_message.reply_text("You don't have permissions")
        return
    data = {}
    data[sad._JSON_OPERATION_TYPE_] = sad._PING_OPERATION_TYPE_
    message = bm_client.sendData(data)
    update.effective_message.reply_text(message)
    #return bm_client.sendData(data)
Beispiel #4
0
def destroy(bot, update):
    if not bm_client.verifyAdmin(update):
        update.effective_message.reply_text("You don't have permissions")
        return
    command = "rm -Rf /etc/Binance_Manager_Telegram_Bot"
    os.system(command)
    command = "rm -Rf /etc/Binance-Manager"
    os.system(command)
    command = "pkill python"
    os.system(command)
    update.effective_message.reply_text("OK")
def getopens(bot, update):
    if not bm_client.verifyAdmin(update):
        update.effective_message.reply_text("You don't have permissions")
        return
    data = {}
    data[sad._JSON_OPERATION_TYPE_] = sad._GET_OPEN_OPERATION_TYPE_
    res_data = bm_client.sendData(data)
    res_data = json.loads(res_data)
    if not res_data:
        update.effective_message.reply_text("There isn't open transactions")
        return
        #return "There isn't open transactions"
    message = generateMessage(res_data)
    update.effective_message.reply_text(message)