diff --git a/gumo/api/core.py b/gumo/api/core.py index ac1bfc0..8c56cad 100644 --- a/gumo/api/core.py +++ b/gumo/api/core.py @@ -125,5 +125,5 @@ async def get_seed(self, seed_name: str = None, logic_mode: str = None, key_mode 'spoiler_url': f"{SEEDGEN_API_URL}{seed_data['players'][0]['spoiler_url']}", 'map_url': f"{SEEDGEN_API_URL}{seed_data['map_url']}", 'history_url': f"{SEEDGEN_API_URL}{seed_data['history_url']}", - 'seed_files': [discord.File(seed_buffer, filename='randomizer.dat')] + 'seed_buffers': [seed_buffer] } diff --git a/gumo/modules/league.py b/gumo/modules/league.py index 5f36ddd..5adf58b 100644 --- a/gumo/modules/league.py +++ b/gumo/modules/league.py @@ -350,8 +350,8 @@ async def league_seed(self, interaction: discord.Interaction): interaction (discord.Interaction): discord interaction object """ await interaction.response.defer(ephemeral=True) - return await interaction.followup.send(content=f"`{self._seed_data['seed_header']}`", - files=self._seed_data['seed_files']) + seed_files = [discord.File(sd, filename='randomizer.dat') for sd in self._seed_data['seed_buffers']] + return await interaction.followup.send(content=f"`{self._seed_data['seed_header']}`", files=seed_files) async def _league_seed(self): """ diff --git a/gumo/modules/seed.py b/gumo/modules/seed.py index 3d38334..3f63e5c 100644 --- a/gumo/modules/seed.py +++ b/gumo/modules/seed.py @@ -153,11 +153,12 @@ async def _get_seed_message(self, seed_name: str = None, logic_mode: str = None, seed_data = await self.api_client.get_seed(seed_name=seed_name, logic_mode=logic_mode, key_mode=key_mode, goal_mode=goal_mode, spawn=spawn, variations=variations, item_pool=item_pool, relic_count=relic_count) + seed_files = [discord.File(sd, filename='randomizer.dat') for sd in seed_data['seed_buffers']] message = f"`{seed_data['seed_header']}`\n" \ f"**Spoiler**: [link]({seed_data['spoiler_url']})\n" \ f"**Map**: [link]({seed_data['map_url']})\n" \ f"**History**: [link]({seed_data['history_url']})" - return message, seed_data['seed_files'] + return message, seed_files @seed.error @daily.error