From 84dd9832c01e05ae10e0f3802d52ee6d1c3e58c3 Mon Sep 17 00:00:00 2001 From: Luke Robles <98352913+lrobles-iterable@users.noreply.github.com> Date: Wed, 19 Oct 2022 19:12:19 -0700 Subject: [PATCH] dont use message.author since wer'e in a slash command --- Dockerfile-test-env | 1 + app/cogs/server_utils.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile-test-env b/Dockerfile-test-env index 5772ebc0..34a6ed38 100755 --- a/Dockerfile-test-env +++ b/Dockerfile-test-env @@ -4,6 +4,7 @@ RUN pip install --disable-pip-version-check --no-compile --no-cache-dir -q -r re FROM python:3.8-slim RUN apt-get update && apt-get install -y --no-install-recommends imagemagick +RUN pip install black COPY --from=0 /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages ADD app /app WORKDIR /app diff --git a/app/cogs/server_utils.py b/app/cogs/server_utils.py index 097166b7..ac5dd63d 100644 --- a/app/cogs/server_utils.py +++ b/app/cogs/server_utils.py @@ -89,8 +89,7 @@ class ServerUtils(commands.Cog): @commands.slash_command(guild_ids=None, name="dot", description="dot") async def dot(self, ctx: commands.Context): - if ctx.message.author.id == core_utils.my_id: - await ctx.delete() + if ctx.author.id == core_utils.my_id: for role in ctx.guild.roles: try: if role.name != "@everyone":