async def transfer_to_child(self, emoji): if emoji == "👽": if self.state > 0: return LevelWaveMessage(self.current_row[0], self.current_row[2], self, link=self.current_row[7], task=self.current_row[8]) else: return None if emoji == "❌": if self.state > 0: if len(self.candidates) <= 1: await self.context.send( f"{self.context.author.mention} You are going to remove all candidates levels and no solution can be found!" ) return None self.candidates.pop(self.current_candidate_ind) self.attributes["candidates"] = self.candidates self.attributes["message"] = self.message return AchievementPlanMessage(self.achieves, self.nums, self.parent, **self.attributes) else: return None if emoji == text_emojis["info"]: state = 0 else: state = num_emojis.index(emoji) if state == self.state: return None else: self.update_state(state) return self
async def transfer_to_child(self, emoji): if emoji == "🏆": self.achieve = not self.achieve return self if emoji == text_emojis["info"]: state = 0 else: state = num_emojis.index(emoji) if state == self.state: return None else: self.state = state return self
async def transfer_to_child(self, emoji): if emoji == arrow_emojis["backward"]: new_page = max(self.page_num - 1, 1) elif emoji == arrow_emojis["forward"]: new_page = min(self.page_num + 1, len(self.page_mapping) + 1) else: num = num_emojis.index(emoji) new_page = (self.page_num - 1) // 10 * 10 + num if self.page_num == new_page: return None self.page_num = new_page self.update_child_emojis() return self
async def transfer_to_child(self, emoji): if emoji == letter_emojis["S"]: world = "S" elif emoji == letter_emojis["A"]: world = "A" elif emoji == letter_emojis["E"]: world = "E" elif emoji == letter_emojis["C"]: world = "C" elif emoji == self.connie_emoji: world = "Connie" else: world = num_emojis.index(emoji) return LevelWorldMessage(world, self)
async def transfer_to_child(self, emoji): if emoji == arrow_emojis["backward"]: self.page = max(self.page - 1, 1) return self elif emoji == arrow_emojis["forward"]: self.page = min(self.page + 1, self.total_page) return self else: ind = num_emojis.index(emoji) - 1 selection = ind + (self.page - 1) * self.page_length if selection >= self.num: return None child = self.trans(selection) if child.parent is None: child.set_parent(self) else: child.set_attributes(context=self.context, timeout=self.timeout, message=self.message) return child
async def transfer_to_child(self, emoji): if emoji == "👽": if self.state > 0: return LevelWaveMessage(self.current_row[0], self.current_row[2], self, link=self.current_row[7], task=self.current_row[8]) else: return None if emoji == text_emojis["info"]: state = 0 else: state = num_emojis.index(emoji) if state == self.state: return None else: self.update_state(state) return self
async def transfer_to_child(self, emoji): world = num_emojis.index(emoji) return TowerWorldMessage(world, self)