def emoji(): emojis = [':)', ':-)', ';-)'] res = kvdb.select('whale_ctx', 'emoji') emojis.remove(res) if res in emojis else '' res = random.choice(emojis) kvdb.insert('whale_ctx', 'emoji', res) return res
def emoji(): emojis = [':)', ':-)', ';-)'] res = kvdb.select('poems_ctx', 'emoji') emojis.remove(res) if res in emojis else '' res = random.choice(emojis) kvdb.insert('poems_ctx', 'emoji', res) return res
def __getattr__(self, key): return kvdb.select('whale_ctx', key)
def select(self, user_id): return kvdb.select('whale_block', user_id)
def select(self, address): return kvdb.select('kindle_sign', address)
def select(self, msg_id): return kvdb.select('poems_sent', msg_id)
def __init__(self): self.poems = kvdb.select('poems_ctx', 'poems') if not self.poems: filepath = os.path.dirname(os.path.abspath(__file__)) self.poems = open(os.path.join(filepath, 'poems.txt')).readlines() kvdb.insert('poems_ctx', 'poems', self.poems)
def select(self, user_id): return kvdb.select('poems_user', user_id)
def select(self, user_id): return kvdb.select('whale_night', user_id)
def select(self, user_id): return kvdb.select('whale_morn', user_id)
def select(self, user_id): return kvdb.select('whale_custom', user_id)
def select(self, msg_id): return kvdb.select('whale_sent', msg_id)
def select(self, ask): return kvdb.select('whale_talk', ask)
def select(self, mobile): return kvdb.select('sms_sync', mobile)
def select(self, user_id): return kvdb.select('whale_lang', user_id)
def __init__(self): self.poems = kvdb.select('poems_ctx', 'poems') if not self.poems: filepath = os.path.dirname(os.path.abspath(__file__)) self.poems = open(os.path.join(filepath,'poems.txt')).readlines() kvdb.insert('poems_ctx', 'poems', self.poems)
def select(self, mail_id): return kvdb.select('kindle_sent', mail_id)