switch to environment variables

This commit is contained in:
2023-09-05 16:57:38 +02:00
parent a8e7f0c882
commit d04f3b63e3
7 changed files with 12 additions and 11 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ class SlashStats(commands.Cog):
async def autocomplete_player(self, interaction: discord.Interaction, current: str) -> list[app_commands.Choice[str]]:
data = []
async with aiohttp.ClientSession() as session:
async with session.get('https://tone.sleepycat.date/v2/client/players') as r:
async with session.get(os.environ.get("TONE_ENDPOINT") + '/v2/client/players') as r:
players = await r.json()
for player_choice in players.keys():
@@ -89,7 +89,7 @@ class SlashStats(commands.Cog):
async def autocomplete_server(self, interaction: discord.Interaction, current: str) -> list[app_commands.Choice[str]]:
data = []
async with aiohttp.ClientSession() as session:
async with session.get('https://tone.sleepycat.date/v2/client/servers') as r:
async with session.get(os.environ.get("TONE_ENDPOINT") + '/v2/client/servers') as r:
servers = await r.json()
for server_choice in servers.keys():