Skip to content

Commit

Permalink
adding admin ids and backend curl
Browse files Browse the repository at this point in the history
  • Loading branch information
accassid committed Aug 22, 2024
1 parent ee6cd0a commit d472e63
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
16 changes: 14 additions & 2 deletions backend/.kubernetes/kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ spec:
livenessProbe:
exec:
command:
- ls
- curl
- -f
- https://backend.commanderspellbook.com
initialDelaySeconds: 40
periodSeconds: 20
timeoutSeconds: 5
Expand All @@ -300,4 +302,14 @@ spec:
valueFrom:
secretKeyRef:
name: discord-bot-secrets
key: discord-token
key: discord-token
- name: KUBE_ADMIN_USER__0
valueFrom:
secretKeyRef:
name: discord-bot-secrets
key: deloo-discord-id
- name: KUBE_ADMIN_USER__1
valueFrom:
secretKeyRef:
name: discord-bot-secrets
key: andy-discord-id
6 changes: 3 additions & 3 deletions bot/discord/spellbook_discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
add_reactions=True,
use_external_emojis=True,
)
administration_guilds = [int(guild) for guild in (os.getenv(f'ADMIN_GUILD__{i}') for i in range(10)) if guild is not None]
administration_users = [int(user) for user in (os.getenv(f'ADMIN_USER__{i}') for i in range(10)) if user is not None]
administration_guilds = [int(guild) for guild in (os.getenv(f'KUBE_ADMIN_GUILD__{i}', os.getenv(f'ADMIN_GUILD__{i}')) for i in range(10)) if guild is not None]
administration_users = [int(user) for user in (os.getenv(f'KUBE_ADMIN_USER__{i}', os.getenv(f'ADMIN_USER__{i}')) for i in range(10)) if user is not None]

MAX_SEARCH_RESULTS = 7

Expand Down Expand Up @@ -346,4 +346,4 @@ async def find_my_combos(interaction: discord.Interaction, decklist: str | None
await interaction.response.send_modal(FindMyCombosModal())


bot.run(os.getenv('DISCORD_TOKEN', ''))
bot.run(os.getenv('KUBE_DISCORD_TOKEN', os.getenv('DISCORD_TOKEN', '')))

0 comments on commit d472e63

Please sign in to comment.