def add_levels(source): for level in range(1, final_level + 1): level_features = source.levels[level - 1] for f in level_features: for field in embeds.get_long_field_args(f.text, f.name): inc_fields(field['value']) embed_queue[-1].add_field(**field)
def push_embed_field(self, title, inline=False, to_meta=False): if not self._embed_queue: return if to_meta: self._meta_queue.extend(self._embed_queue) else: chunks = embeds.get_long_field_args('\n'.join(self._embed_queue), title) self._field_queue.extend(chunks) self._embed_queue = []
def push_embed_field(self, title, inline=False, to_meta=False): """Pushes all lines currently in the embed queue to a new field.""" if not self._embed_queue: return if to_meta: self._meta_queue.extend(self._embed_queue) else: chunks = embeds.get_long_field_args('\n'.join(self._embed_queue), title) self._field_queue.extend(chunks) self._embed_queue = []