def config(chat_id, message_id): l = getLanguage(chat_id) bds.setWaiting(chat_id, True) keyboard = makeKb(getKb(chat_id, 'config')[0], resize_keyboard=True, selective=True) return [ toDict(chat_id, l.linguas, replyTo=message_id, replyMarkup=keyboard) ]
def voltar(chat_id, msg, message_id, u_id, esp=None): rpl = [] i = 0 if bds.getSettings(chat_id).waiting: bds.setWaiting(chat_id, False) if bds.getInGame(chat_id): kb = getKb(chat_id, 'cmd') if not bds.checkAdm(chat_id, u_id): i = 0 else: i = 1 elif bds.getPreGame(chat_id): kb = getKb(chat_id, 'cmd') i = 0 else: kb = getKb(chat_id, 'main') i = 0 else: if bds.getArriscarBlock(chat_id): bds.setArriscarBlock(chat_id, False) kb = getKb(chat_id, 'main', u_id=u_id) if len(kb) != 1: if not bds.checkAdm(chat_id, u_id): i = 0 else: i = 1 if not esp: keyboard = makeKb(kb[i], resize_keyboard=True, selective=True) rpl.append( toDict(chat_id, msg, replyTo=message_id, replyMarkup=keyboard)) else: keyboard = makeKb(kb[0], resize_keyboard=True) rpl.append(toDict(chat_id, msg, replyMarkup=keyboard)) if len(kb) != 1: keyboard = makeKb(kb[1], resize_keyboard=True, selective=True) rpl.append( toDict(chat_id, msg, replyTo=message_id, replyMarkup=keyboard)) return rpl
def voltar(chat_id, msg, message_id, u_id, esp = None): rpl = [] i = 0 if bds.getSettings(chat_id).waiting: bds.setWaiting(chat_id, False) if bds.getInGame(chat_id): kb = getKb(chat_id, 'cmd') if not bds.checkAdm(chat_id, u_id): i = 0 else: i = 1 elif bds.getPreGame(chat_id): kb = getKb(chat_id, 'cmd') i = 0 else: kb = getKb(chat_id, 'main') i = 0 else: if bds.getArriscarBlock(chat_id): bds.setArriscarBlock(chat_id, False) kb = getKb(chat_id, 'main', u_id = u_id) if len(kb) != 1: if not bds.checkAdm(chat_id, u_id): i = 0 else: i = 1 if not esp: keyboard = makeKb(kb[i], resize_keyboard = True, selective = True) rpl.append(toDict(chat_id, msg, replyTo = message_id, replyMarkup = keyboard)) else: keyboard = makeKb(kb[0], resize_keyboard = True) rpl.append(toDict(chat_id, msg, replyMarkup = keyboard)) if len(kb) != 1: keyboard = makeKb(kb[1], resize_keyboard = True, selective = True) rpl.append(toDict(chat_id, msg, replyTo = message_id, replyMarkup = keyboard)) return rpl
def config(chat_id, message_id): l = getLanguage(chat_id) bds.setWaiting(chat_id, True) keyboard = makeKb(getKb(chat_id, 'config')[0], resize_keyboard = True, selective = True) return [toDict(chat_id, l.linguas, replyTo = message_id, replyMarkup = keyboard)]