diff --git a/Dockerfile b/Dockerfile index 5e89a04..d4dde17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 # check=error=true;experimental=all -FROM --platform=$BUILDPLATFORM ghcr.io/astral-sh/uv:python3.13-bookworm-slim@sha256:73c021c3fe7264924877039e8a449ad3bb380ec89214282301affa9b2f863c5d +FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim@sha256:73c021c3fe7264924877039e8a449ad3bb380ec89214282301affa9b2f863c5d # Change the working directory to the `app` directory WORKDIR /app diff --git a/main.py b/main.py index 5bf6ffa..473701f 100644 --- a/main.py +++ b/main.py @@ -66,7 +66,6 @@ class LoviBotClient(discord.Client): # Only allow certain users to interact with the bot allowed_users: list[str] = get_allowed_users() if message.author.name not in allowed_users: - logger.info("Ignoring message from: %s", message.author.name) return incoming_message: str | None = message.content @@ -175,15 +174,14 @@ async def ask(interaction: discord.Interaction, text: str) -> None: await interaction.followup.send("You need to provide a question or message.", ephemeral=True) return - # Only allow certain users to interact with the bot - allowed_users: list[str] = get_allowed_users() - user_name_lowercase: str = interaction.user.name.lower() logger.info("Received command from: %s", user_name_lowercase) + # Only allow certain users to interact with the bot + allowed_users: list[str] = get_allowed_users() if user_name_lowercase not in allowed_users: logger.info("Ignoring message from: %s", user_name_lowercase) - await interaction.followup.send("You are not allowed to use this command.", ephemeral=True) + await interaction.followup.send("You are not allowed to use this command.") return try: