diff --git a/Dockerfile-test-env b/Dockerfile-test-env index 34a6ed38..a324dac5 100755 --- a/Dockerfile-test-env +++ b/Dockerfile-test-env @@ -4,7 +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 +RUN pip install black && echo "find . -name \"*sync-conflict*\" -delete; black .; ./bot.py" > /usr/local/bin/start && chmod +x /usr/local/bin/start 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/actual_utils.py b/app/cogs/actual_utils.py index d6fb8502..db792d8a 100644 --- a/app/cogs/actual_utils.py +++ b/app/cogs/actual_utils.py @@ -117,15 +117,25 @@ class ActualUtils(commands.Cog): ) await ctx.send(embed=embed) - @commands.command(name="corona", aliases=["covid"]) - async def corona(self, ctx: commands.Context, *, location=None): + @commands.slash_command( + guild_ids=None, + name="corona", + description="Query Johns hopkins online covid stats. Requires a location", + ) + @option( + name="location", + required=True, + description="The location you want to see covid stats for", + default="California", + ) + async def corona(self, ctx: commands.Context, location): import corona - async with ctx.message.channel.typing(): - result = corona.parse_message(location) + await ctx.defer() + result = corona.parse_message(location) - await ctx.send(embed=result) + await ctx.send_followup(embed=result) @commands.slash_command( guld_ids=None,