def puto(bot, update): mensaje = update.message.text recibe = mensaje.upper() if "PUTO" in recibe: bot.delete_message(chat_id=update.message.chat_id, message_id=update.message.message_id) if "MEJOR ROM" in recibe: bot.send_message(chat_id=update.message.chat_id, text="*No hay ninguna rom mejor que otra .-.*", parse_mode=telegram.ParseMode.MARKDOWN, reply_to_message_id=update.message.message_id)
def di(bot, update): pass chat_id = update.effective_message.text.split(None, 1) to_send = update.effective_message.text.split(None, 2) try: bot.send_message(chat_id=chat_id[1], text=to_send[2]) bot.delete_message(chat_id=update.message.chat_id, message_id=update.message.message_id) except: bot.send_message(chat_id=update.message.chat_id, text="*No he podido mandar el mensaje.*", parse_mode=telegram.ParseMode.MARKDOWN, reply_to_message_id=update.message.message_id)
def delete(bot, update): pass prev_message = update.effective_message.reply_to_message print(prev_message.message_id) if prev_message.message_id: try: bot.delete_message(chat_id=update.message.chat_id, message_id=prev_message.message_id) bot.delete_message(chat_id=update.message.chat_id, message_id=update.message.message_id) except: bot.send_message(chat_id=update.message.chat_id, text="*No tengo permisos!*", parse_mode=telegram.ParseMode.MARKDOWN, reply_to_message_id=update.message.message_id)
def efbot(bot, update): prohibited = ["http://tinyurl.com", "https://t.me", "http://t.me"] mensaje = update.message.text username = update.message.from_user.username id = update.message.from_user.id chat_title = update.message.chat.title print(username, id, chat_title) for x in prohibited: if x in mensaje: # bot.kick_chat_member(chat_id=update.message.chat_id, user_id=update.effective_user.id) bot.forward_message(chat_id=-1001122754147, from_chat_id=update.message.chat_id, message_id=update.message.message_id) bot.delete_message(chat_id=update.message.chat_id, message_id=update.message.message_id) bot.send_message( chat_id=-1001122754147, text="*USERNAME:* @{}\n*ID:* {}\n*Ha hecho spam en el chat:* {}" .format(username, id, chat_title), parse_mode=telegram.ParseMode.MARKDOWN)
def playGAME(bot, message): try: message_to_delete = message.message_id userName = message.from_user.username.replace("@", "") if userName is None: msg = bot.reply_to(message, "У тебя нет никнейма, что бы играть") bot.message_stack.append(msg) return userMoney = int(database.getDBValue(userName, "eco", "money")) user_slot_gamed_count = int(database.getDBValue(userName, "stats", "slot_gamed_count")) user_money_lost_in_slot = int(database.getDBValue(userName, "stats", "money_lost_in_slot")) if userMoney < 0: delete = bot.reply_to(message, "У тебя нет денег, возьми кредит /banks") time.sleep(15) bot.delete_message(message.chat.id, delete.message_id) else: command = message.text.split() bet = 1 if len(command) > 1: if command[1] == "0": bet = 1 bet = int(command[1]) if bet > 25: delete = bot.reply_to(message, "Максимальная ставка - х25🕹") time.sleep(4) bot.delete_message(message.chat.id, delete.message_id) return user_slot_gamed_count += 1 user_money_lost_in_slot = user_money_lost_in_slot + (config.global_economic["slot_spin_cost"]*bet) slotState = getSlotState(bet) prize = int(slotState[0]) slot_line1 = slotState[1][0] slot_line2 = slotState[1][1] slot_line3 = slotState[1][2] won = userMoney + prize if prize == 0: won = userMoney - (config.global_economic["slot_spin_cost"]*bet) UI = "" #UI = "👨: @" + userName + "\n" UI += "\n⚖️Баланс: " + str(won) + "💲\n" UI += "\n🕹Cтавка: "+str((config.global_economic["slot_spin_cost"]*bet))+"💶\n\n" UI += "3x🍏 = "+str(config.global_economic["slot_item1_cost"]*bet)+"\n3x🍋 = "+str(config.global_economic["slot_item2_cost"]*bet)+"\n3x🍇 = "+str(config.global_economic["slot_item3_cost"]*bet)+"\n3x🍒 = "+str(config.global_economic["slot_item4_cost"]*bet)+"\n3x7️⃣ = "+str(config.global_economic["slot_item5_cost"]*bet)+" \n" UI += "----------------------------\n" UI += "[ -" + slot_line1[0][0] + "- -" + slot_line1[1][0] + "- -" + slot_line1[2][0] + "- ]\n" UI += "[ -" + slot_line2[0][0]+ "- -" + slot_line2[1][0] + "- -" + slot_line2[2][0] + "- ]\n" UI += "[ -" + slot_line3[0][0]+ "- -" + slot_line3[1][0] + "- -" + slot_line3[2][0] + "- ]\n" UI += "----------------------------\n" if prize == 0: UI += "\nТы потерял свои несчастные: " + str(config.global_economic["slot_spin_cost"]*bet) + "💲 и ничего не выиграл\n" else: UI += "\n🎉 Выигрыш: " + str(prize) + "💲\n" database.setDBValue(userName, "eco", "money", str(won)) database.setDBValue(userName, "stats", "slot_gamed_count", str(user_slot_gamed_count)) database.setDBValue(userName, "stats", "money_lost_in_slot", str(user_money_lost_in_slot)) show_ui = bot.reply_to(message, UI) time.sleep(10) bot.delete_message(message.chat.id, show_ui.message_id) bot.delete_message(message.chat.id, message_to_delete) except: #msg = bot.send_message(message.chat.id, "Попробуй еще раз, что-то сломалось") #bot.message_stack.append(msg) pass